在excel ex中拆分列

2024-10-04 05:33:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个代码,可以下载包含一些数据的摘录。我的问题是摘录提供了多列数据,我想将其中一列拆分为多列

from ExtractionAPI.Helper import ExtractionAPIHelper

from ExtractionAPI.Enums import Environment, Category, RequestType

from datetime import datetime

if __name__ == '__main__':
    env = Environment.PROD

    outdir = 'c:/temp'

    start_date = '2019-05-16'
    stop_date = '2019-05-17'

    start = datetime.strptime(start_date, '%Y-%m-%d')
    stop = datetime.strptime(stop_date, '%Y-%m-%d')

    cob = start
    from datetime import timedelta

    while cob < stop:
        cob = cob + timedelta(days=1)

        app = 'EOD-RBPL'

        cat = Category.Available

        booklist = ['RNIB', 'HNIB']

        partitions = ['Book']

        scopes = ['Trade.PnL.FXSpot.Delta', 'Trade.PnL.FXSpot.Gamma']

        for scope in scopes:
            api = ExtractionAPIHelper(env,outdir)
            file_loc = api.downloadScopeData(app, cob, scope, cat, booklist, level=partitions,
                                     requestType=RequestType.TabularCSV)

            print('Output file location:', file_loc)

我试图在这里寻找答案,但我找不到任何与下载的csv文件有关的内容

谢谢


Tags: 数据fromimportenvdatetimedateenvironmentstart