转日期字符串为datetime格式出错,请帮忙看一下,谢谢。

策略分享
标签: #<Tag:0x00007fc5791bb688>

(franklili) #1
克隆策略

    {"Description":"实验创建于2020/3/24","Summary":"","Graph":{"EdgesInternal":[{"DestinationInputPortId":"-35:input_ds","SourceOutputPortId":"-208:data"},{"DestinationInputPortId":"-40:input_ds","SourceOutputPortId":"-212:data"},{"DestinationInputPortId":"-62:input_ds","SourceOutputPortId":"-216:data"},{"DestinationInputPortId":"-57:input_ds","SourceOutputPortId":"-220:data"},{"DestinationInputPortId":"-72:input_ds","SourceOutputPortId":"-224:data"},{"DestinationInputPortId":"-77:input_1","SourceOutputPortId":"-231:data"},{"DestinationInputPortId":"-231:input_data_1","SourceOutputPortId":"-35:data"},{"DestinationInputPortId":"-231:input_data_2","SourceOutputPortId":"-40:data"},{"DestinationInputPortId":"-69:input_data_2","SourceOutputPortId":"-57:data"},{"DestinationInputPortId":"-69:input_data_1","SourceOutputPortId":"-62:data"},{"DestinationInputPortId":"-65:input_1","SourceOutputPortId":"-69:data"},{"DestinationInputPortId":"-78:data2","SourceOutputPortId":"-72:data"},{"DestinationInputPortId":"-78:data1","SourceOutputPortId":"-65:data_1"}],"ModuleNodes":[{"Id":"-201","ModuleId":"BigQuantSpace.input_csv.input_csv-v5","ModuleParameters":[{"Name":"file","Value":"bitfinex-BTCUSD-1d.csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"coding","Value":"GBK","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"dtypes","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"date_type","Value":"%Y-%m-%d","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"date_cols","Value":"['date']","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-201","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":1,"IsPartOfPartialRun":null,"Comment":"bitfinexBTCUSD行情2013-04-01","CommentCollapsed":false},{"Id":"-208","ModuleId":"BigQuantSpace.csv_read.csv_read-v3","ModuleParameters":[{"Name":"csv_path","Value":"https://api.blockchain.info/charts/market-cap?start=2010-01-01&timespan=6years&format=csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"encoding","Value":"utf-8","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-208","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":2,"IsPartOfPartialRun":null,"Comment":"比特币市值2010-2016","CommentCollapsed":false},{"Id":"-212","ModuleId":"BigQuantSpace.csv_read.csv_read-v3","ModuleParameters":[{"Name":"csv_path","Value":"https://api.blockchain.info/charts/market-cap?start=2016-01-01&timespan=6years&format=csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"encoding","Value":"utf-8","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-212","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":3,"IsPartOfPartialRun":null,"Comment":"比特币市值2016-2020","CommentCollapsed":false},{"Id":"-216","ModuleId":"BigQuantSpace.csv_read.csv_read-v3","ModuleParameters":[{"Name":"csv_path","Value":"https://api.blockchain.info/charts/total-bitcoins?start=2010-01-01&timespan=6years&format=csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"encoding","Value":"utf-8","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-216","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":4,"IsPartOfPartialRun":null,"Comment":"比特币供应量2010-2016","CommentCollapsed":false},{"Id":"-220","ModuleId":"BigQuantSpace.csv_read.csv_read-v3","ModuleParameters":[{"Name":"csv_path","Value":"https://api.blockchain.info/charts/total-bitcoins?start=2016-01-01&timespan=6years&format=csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"encoding","Value":"utf-8","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-220","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":5,"IsPartOfPartialRun":null,"Comment":"比特币供应量2016-2020","CommentCollapsed":false},{"Id":"-224","ModuleId":"BigQuantSpace.csv_read.csv_read-v3","ModuleParameters":[{"Name":"csv_path","Value":"https://api.blockchair.com/bitcoin/transactions?a=date,sum(cdd_total)&export=csv","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"encoding","Value":"utf-8","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[],"OutputPortsInternal":[{"Name":"data","NodeId":"-224","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":6,"IsPartOfPartialRun":null,"Comment":"比特币币天销毁数","CommentCollapsed":false},{"Id":"-231","ModuleId":"BigQuantSpace.concat.concat-v3","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_1","NodeId":"-231"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_2","NodeId":"-231"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_3","NodeId":"-231"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-231","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":7,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-35","ModuleId":"BigQuantSpace.rename_columns1.rename_columns1-v1","ModuleParameters":[{"Name":"columns","Value":"2010-01-01 00:03:54@date|0.0@market_cap","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"keep_old_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_ds","NodeId":"-35"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-35","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":8,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-40","ModuleId":"BigQuantSpace.rename_columns1.rename_columns1-v1","ModuleParameters":[{"Name":"columns","Value":"2016-01-01 00:03:21@date|6474139727@market_cap","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"keep_old_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_ds","NodeId":"-40"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-40","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":9,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-57","ModuleId":"BigQuantSpace.rename_columns1.rename_columns1-v1","ModuleParameters":[{"Name":"columns","Value":"2016-01-01 00:03:21@date|15029575@supply","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"keep_old_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_ds","NodeId":"-57"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-57","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":10,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-62","ModuleId":"BigQuantSpace.rename_columns1.rename_columns1-v1","ModuleParameters":[{"Name":"columns","Value":"2010-01-01 00:03:54@date|1624550.0@supply","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"keep_old_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_ds","NodeId":"-62"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-62","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":11,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-69","ModuleId":"BigQuantSpace.concat.concat-v3","ModuleParameters":[],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_1","NodeId":"-69"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_2","NodeId":"-69"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_data_3","NodeId":"-69"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-69","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":12,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-72","ModuleId":"BigQuantSpace.rename_columns1.rename_columns1-v1","ModuleParameters":[{"Name":"columns","Value":"sum(cdd_total)@coin_days_destroyed","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"keep_old_columns","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_ds","NodeId":"-72"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-72","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":13,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-78","ModuleId":"BigQuantSpace.join.join-v3","ModuleParameters":[{"Name":"on","Value":"date","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"how","Value":"inner","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"sort","Value":"False","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data1","NodeId":"-78"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"data2","NodeId":"-78"}],"OutputPortsInternal":[{"Name":"data","NodeId":"-78","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":14,"IsPartOfPartialRun":null,"Comment":"","CommentCollapsed":true},{"Id":"-65","ModuleId":"BigQuantSpace.cached.cached-v3","ModuleParameters":[{"Name":"run","Value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n df = input_1.read_df()\n df['date0'] = df['date'].apply(lambda x: x[0:11])\n df['date1'] = df['date0'].apply(lambda x: datetime.datetime.strptime(x, '%Y-%m-%d'))\n df = df.drop(['date0', 'date'], axis=1)\n df = df.rename(columns={'date1': 'date'})\n #df = pd.DataFrame({'data': [1, 2, 3]})\n data_1 = DataSource.write_df(df)\n data_2 = DataSource.write_pickle(df)\n return Outputs(data_1=data_1, data_2=data_2, data_3=None)\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"post_run","Value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"input_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"params","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"output_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-65"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-65"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_3","NodeId":"-65"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-65","OutputType":null},{"Name":"data_2","NodeId":"-65","OutputType":null},{"Name":"data_3","NodeId":"-65","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":15,"IsPartOfPartialRun":null,"Comment":"修改日期为datetime格式","CommentCollapsed":false},{"Id":"-77","ModuleId":"BigQuantSpace.cached.cached-v3","ModuleParameters":[{"Name":"run","Value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n df = input_1.read_df()\n df['date1'] = df['date'].apply(lambda x: x[0:11])\n df = df.drop('date', axis=1)\n df = df.rename(columns={'date1': 'date'})\n #df = pd.DataFrame({'data': [1, 2, 3]})\n data_1 = DataSource.write_df(df)\n data_2 = DataSource.write_pickle(df)\n return Outputs(data_1=data_1, data_2=data_2, data_3=None)\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"post_run","Value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"input_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"params","Value":"{}","ValueType":"Literal","LinkedGlobalParameter":null},{"Name":"output_ports","Value":"","ValueType":"Literal","LinkedGlobalParameter":null}],"InputPortsInternal":[{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_1","NodeId":"-77"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_2","NodeId":"-77"},{"DataSourceId":null,"TrainedModelId":null,"TransformModuleId":null,"Name":"input_3","NodeId":"-77"}],"OutputPortsInternal":[{"Name":"data_1","NodeId":"-77","OutputType":null},{"Name":"data_2","NodeId":"-77","OutputType":null},{"Name":"data_3","NodeId":"-77","OutputType":null}],"UsePreviousResults":true,"moduleIdForCode":16,"IsPartOfPartialRun":null,"Comment":"修改日期为年月日","CommentCollapsed":true}],"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions><NodePosition Node='-201' Position='278,113,200,200'/><NodePosition Node='-208' Position='-259,226,200,200'/><NodePosition Node='-212' Position='32,230,200,200'/><NodePosition Node='-216' Position='351,217,200,200'/><NodePosition Node='-220' Position='650,219,200,200'/><NodePosition Node='-224' Position='940,218,200,200'/><NodePosition Node='-231' Position='-123,424,200,200'/><NodePosition Node='-35' Position='-246,343,200,200'/><NodePosition Node='-40' Position='54,335,200,200'/><NodePosition Node='-57' Position='649,332,200,200'/><NodePosition Node='-62' Position='353,327,200,200'/><NodePosition Node='-69' Position='473,422,200,200'/><NodePosition Node='-72' Position='947,332,200,200'/><NodePosition Node='-78' Position='769,618,200,200'/><NodePosition Node='-65' Position='452,510,200,200'/><NodePosition Node='-77' Position='-118,509,200,200'/></NodePositions><NodeGroups /></DataV1>"},"IsDraft":true,"ParentExperimentId":null,"WebService":{"IsWebServiceExperiment":false,"Inputs":[],"Outputs":[],"Parameters":[{"Name":"交易日期","Value":"","ParameterDefinition":{"Name":"交易日期","FriendlyName":"交易日期","DefaultValue":"","ParameterType":"String","HasDefaultValue":true,"IsOptional":true,"ParameterRules":[],"HasRules":false,"MarkupType":0,"CredentialDescriptor":null}}],"WebServiceGroupId":null,"SerializedClientData":"<?xml version='1.0' encoding='utf-16'?><DataV1 xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><Meta /><NodePositions></NodePositions><NodeGroups /></DataV1>"},"DisableNodesUpdate":false,"Category":"user","Tags":[],"IsPartialRun":true}
    In [34]:
    # 本代码由可视化策略环境自动生成 Fri Mar 27 2020
    # 本代码单元只能在可视化模式下编辑。您也可以拷贝代码,粘贴到新建的代码单元或者策略,然后修改。
    
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m16_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read_df()
        df['date1'] = df['date'].apply(lambda x: x[0:11])
        df = df.drop('date', axis=1)
        df = df.rename(columns={'date1': 'date'})
        #df = pd.DataFrame({'data': [1, 2, 3]})
        data_1 = DataSource.write_df(df)
        data_2 = DataSource.write_pickle(df)
        return Outputs(data_1=data_1, data_2=data_2, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m16_post_run_bigquant_run(outputs):
        return outputs
    
    # Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端
    def m15_run_bigquant_run(input_1, input_2, input_3):
        # 示例代码如下。在这里编写您的代码
        df = input_1.read_df()
        df['date0'] = df['date'].apply(lambda x: x[0:11])
        df['date1'] = df['date0'].apply(lambda x: datetime.datetime.strptime(x, '%Y-%m-%d'))
        df = df.drop(['date0', 'date'], axis=1)
        df = df.rename(columns={'date1': 'date'})
        #df = pd.DataFrame({'data': [1, 2, 3]})
        data_1 = DataSource.write_df(df)
        data_2 = DataSource.write_pickle(df)
        return Outputs(data_1=data_1, data_2=data_2, data_3=None)
    
    # 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。
    def m15_post_run_bigquant_run(outputs):
        return outputs
    
    
    m1 = M.input_csv.v5(
        file='bitfinex-BTCUSD-1d.csv',
        coding='GBK',
        dtypes={},
        date_type='%Y-%m-%d',
        date_cols=['date']
    )
    
    m2 = M.csv_read.v3(
        csv_path='https://api.blockchain.info/charts/market-cap?start=2010-01-01&timespan=6years&format=csv',
        encoding='utf-8'
    )
    
    m8 = M.rename_columns1.v1(
        input_ds=m2.data,
        columns='2010-01-01 00:03:54@date|0.0@market_cap',
        keep_old_columns=False
    )
    
    m3 = M.csv_read.v3(
        csv_path='https://api.blockchain.info/charts/market-cap?start=2016-01-01&timespan=6years&format=csv',
        encoding='utf-8'
    )
    
    m9 = M.rename_columns1.v1(
        input_ds=m3.data,
        columns='2016-01-01 00:03:21@date|6474139727@market_cap',
        keep_old_columns=False
    )
    
    m7 = M.concat.v3(
        input_data_1=m8.data,
        input_data_2=m9.data
    )
    
    m16 = M.cached.v3(
        input_1=m7.data,
        run=m16_run_bigquant_run,
        post_run=m16_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m4 = M.csv_read.v3(
        csv_path='https://api.blockchain.info/charts/total-bitcoins?start=2010-01-01&timespan=6years&format=csv',
        encoding='utf-8'
    )
    
    m11 = M.rename_columns1.v1(
        input_ds=m4.data,
        columns='2010-01-01 00:03:54@date|1624550.0@supply',
        keep_old_columns=False
    )
    
    m5 = M.csv_read.v3(
        csv_path='https://api.blockchain.info/charts/total-bitcoins?start=2016-01-01&timespan=6years&format=csv',
        encoding='utf-8'
    )
    
    m10 = M.rename_columns1.v1(
        input_ds=m5.data,
        columns='2016-01-01 00:03:21@date|15029575@supply',
        keep_old_columns=False
    )
    
    m12 = M.concat.v3(
        input_data_1=m11.data,
        input_data_2=m10.data
    )
    
    m15 = M.cached.v3(
        input_1=m12.data,
        run=m15_run_bigquant_run,
        post_run=m15_post_run_bigquant_run,
        input_ports='',
        params='{}',
        output_ports=''
    )
    
    m6 = M.csv_read.v3(
        csv_path='https://api.blockchair.com/bitcoin/transactions?a=date,sum(cdd_total)&export=csv',
        encoding='utf-8'
    )
    
    m13 = M.rename_columns1.v1(
        input_ds=m6.data,
        columns='sum(cdd_total)@coin_days_destroyed',
        keep_old_columns=False
    )
    
    m14 = M.join.v3(
        data1=m15.data_1,
        data2=m13.data,
        on='date',
        how='inner',
        sort=False
    )
    

    自定义Python模块(cached)使用错误,你可以:

    1.一键查看文档

    2.一键搜索答案

    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    <ipython-input-34-fbb28c2fe67b> in <module>()
         54     input_ports='',
         55     params='{}',
    ---> 56     output_ports=''
         57 )
    
    <ipython-input-34-fbb28c2fe67b> in m15_run_bigquant_run(input_1, input_2, input_3)
          8     df = input_1.read_df()
          9     df['date0'] = df['date'].apply(lambda x: x[0:11])
    ---> 10     df['date1'] = df['date0'].apply(lambda x: datetime.datetime.strptime(x, '%Y-%m-%d'))
         11     df = df.drop(['date0', 'date'], axis=1)
         12     df = df.rename(columns={'date1': 'date'})
    
    <ipython-input-34-fbb28c2fe67b> in <lambda>(x)
          8     df = input_1.read_df()
          9     df['date0'] = df['date'].apply(lambda x: x[0:11])
    ---> 10     df['date1'] = df['date0'].apply(lambda x: datetime.datetime.strptime(x, '%Y-%m-%d'))
         11     df = df.drop(['date0', 'date'], axis=1)
         12     df = df.rename(columns={'date1': 'date'})
    
    ValueError: unconverted data remains:  
    In [30]:
    m15.data_1.read_df().head()
    
    Out[30]:
    date supply date0
    0 2010-01-03 06:12:45 1639200.0 2010-01-03
    1 2010-01-04 09:36:14 1650700.0 2010-01-04
    2 2010-01-05 14:34:29 1662100.0 2010-01-05
    3 2010-01-06 23:07:09 1673550.0 2010-01-06
    4 2010-01-08 11:33:15 1684950.0 2010-01-08
    In [25]:
    m15.data_1.read_df().dtypes
    
    Out[25]:
    supply           float64
    date      datetime64[ns]
    dtype: object
    In [19]:
    m13.data.read_df().tail()
    
    Out[19]:
    date coin_days_destroyed
    4091 2020-03-22 4.396617e+06
    4092 2020-03-23 8.070017e+06
    4093 2020-03-24 5.746271e+06
    4094 2020-03-25 1.200291e+07
    4095 2020-03-26 2.318691e+06