本文整理匯總了Python中vis.analyzers.indexers.interval.IntervalIndexer.to_csv方法的典型用法代碼示例。如果您正苦於以下問題:Python IntervalIndexer.to_csv方法的具體用法?Python IntervalIndexer.to_csv怎麽用?Python IntervalIndexer.to_csv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vis.analyzers.indexers.interval.IntervalIndexer
的用法示例。
在下文中一共展示了IntervalIndexer.to_csv方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run_my_task
# 需要導入模塊: from vis.analyzers.indexers.interval import IntervalIndexer [as 別名]
# 或者: from vis.analyzers.indexers.interval.IntervalIndexer import to_csv [as 別名]
def run_my_task(self, inputs, settings, outputs):
# Set execution settings.
wrapper_settings = dict( [(k, settings[k]) for k in ('Simple or Compound Intervals', 'Interval Quality')] )
execution_settings = dict()
if wrapper_settings['Simple or Compound Intervals'] == 0:
execution_settings['simple or compound'] = 'simple'
else:
execution_settings['simple or compound'] = 'compound'
execution_settings['quality'] = wrapper_settings['Interval Quality']
execution_settings['mp'] = False
execution_settings['directed'] = True
# Run.
infile = inputs['NoteRest Interval Indexer Result'][0]['resource_path']
outfile = outputs['Vertical Interval Indexer Result'][0]['resource_path']
data = DataFrame.from_csv(infile, header = [0, 1]) # We know the first two rows constitute a MultiIndex
vertical_intervals = IntervalIndexer(data, execution_settings).run()
vertical_intervals.to_csv(outfile)
return True