data = pd.read_csv('D:/bitstampUSD_1-min_data_2012-01-01_to_2021-03-31.csv',parse_dates=[0], date_parser=dateparse)
报错如下:
--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-39-ef6f6da774f6> in <module> ----> 1 data = pd.read_csv('D:/金融辅修毕业论文—数字货币/bitstampUSD_1-min_data_2012-01-01_to_2021-03-31.csv',parse_dates=[0], date_parser=dateparse) 2 data['Timestamp'] = data['Timestamp'].dt.tz_localize(None) 3 data = data.groupby([pd.Grouper(key='Timestamp', freq='H')]).first().reset_index() 4 data = data.set_index('Timestamp') 5 data = data[['Weighted_Price']] NameError: name 'dateparse' is not defined
不知道dateparse在哪里,这个难道不是自带的参数吗?