我有一个用 pandas 导入的数据框。 Open High Low Close VolumeDate 2020-10-09 115.2800 117.0000 114.9200 116.9700 995446002020-10-08 116.2500 116.4000 114.5901 114.9700 834771502020-10-07 114.6200 115.5500 114.1300 115.0800 968489902020-10-06 115.7000 116.1200 112.2500 113.1600 1614982002020-10-05 113.9100 116.6500 113.5500 116.5000 106243800 ... ... ... ... ...2010-10-15 10.9800 11.2500 10.8896 11.2407 9167571532010-10-14 10.7746 10.8025 10.7286 10.7968 4332586672010-10-13 10.7214 10.7843 10.7071 10.7193 6210621522010-10-12 10.5504 10.6964 10.4461 10.6621 5564510572010-10-11 10.5264 10.6157 10.5214 10.5486 426705269我在尝试引用专栏时遇到困难。我认为它应该像这样简单dataset['Close']。然而每当我尝试这个时,我都会得到KeyError: 'Close'。我用来创建数据集的确切行是dataset = pd.read_csv('AAPL.csv', index_col="Date", parse_dates=True)根据要求 AAPL.csv(前几行):Date, Open, High, Low, Close, Volume10/09/2020,115.28,117,114.92,116.97,9954460010/08/2020,116.25,116.4,114.5901,114.97,8347715010/07/2020,114.62,115.55,114.13,115.08,96848990
添加回答
举报
0/150
提交
取消