我正在将csv导入熊猫数据帧。它无法正确导入“我的日期”列。
Ticker,Date_Time,Close,volume rate,Volatility,breakouthappened,prevdaycci negative,stopprice,day1gainpotential,day1closegainpotential,day2gainpotential,day3gainpotential,day4gainpotential,breakoutpoint,#
AAAP,2016年12月27日,26.29263,6.12,0,-165.77,23.51,-2.49,-4.95,-2.53,-2.71,0.51,24.39,1
potential_trades_df=pd.read_csv('C:\\Users\\Ramesh\\PycharmProjects\\DemoTest\\TradeSignals.csv',parse_dates=True,keep_date_col = True)
currenttrade=potential_trades_df.iloc[0]
>>> currenttrade.Date_Time.strptime('%Y-%m-%d')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute 'strptime'