當前位置: 首頁>>代碼示例>>Python>>正文


Python IntervalIndexer.to_csv方法代碼示例

本文整理匯總了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
開發者ID:ELVIS-Project,項目名稱:vis-rodan,代碼行數:23,代碼來源:vertical_interval_indexer.py


注:本文中的vis.analyzers.indexers.interval.IntervalIndexer.to_csv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。