复制链接
克隆策略
In [7]:
# df = pd.DataFrame({'A':[1,2,3,4],'B':[10,100,1000,10000]})
# df.to_csv('data.csv')

    {"description":"实验创建于2021/11/29","graph":{"edges":[],"nodes":[{"node_id":"-29","module_id":"BigQuantSpace.datahub_load_file.datahub_load_file-v2","parameters":[{"name":"file_path","value":"# Python 动态生成文件路径\ndef bigquant_run():\n file_path = 'data.csv'\n return file_path\n","type":"Literal","bound_global_parameter":null},{"name":"file_type","value":"csv","type":"Literal","bound_global_parameter":null},{"name":"csv_delimiter","value":",","type":"Literal","bound_global_parameter":null},{"name":"other_parameters","value":"{'header':0,\n'index_col':0}","type":"Literal","bound_global_parameter":null},{"name":"h5_data_key","value":"data","type":"Literal","bound_global_parameter":null}],"input_ports":[],"output_ports":[{"name":"data","node_id":"-29"}],"cacheable":false,"seq_num":5,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-29' Position='168.2410125732422,169.2719783782959,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
    In [16]:
    # 本代码由可视化策略环境自动生成 2021年12月8日 09:16
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # Python 动态生成文件路径
    def m5_file_path_bigquant_run():
        file_path = 'data.csv'
        return file_path
    
    
    m5 = M.datahub_load_file.v2(
        file_path=m5_file_path_bigquant_run,
        file_type='csv',
        csv_delimiter=',',
        other_parameters="""{'header':0,
    'index_col':0}""",
        h5_data_key='data'
    )
    

    读取数据(文件) 数据统计 (前 4 行) </font></font>

    A B
    count(Nan) 0 0
    type int64 int64

    读取数据(文件) 数据预览 (前 5 行) </font></font>

    A B
    0 1 10
    1 2 100
    2 3 1000
    3 4 10000