错误反馈:密钥错误:‘arrival’
原因分析:常见的KeyError原因是,在相应的数据集中找不到要查找的某个项目或几个项目(或者命中错误等)。 )
示例: arrival date=schedule [ ' arrival ' ]
运行后错误:
` keyerrortraceback (mostrecentcalllast ) d : (anaconda (lib (站点包索引) base.)。 tolerance (2897 try :-2898 return self._ engine.get _ loc ) casted_key ) 2899 exceptkeyerroraserr : pandas _ _ _ index engine.get _ loc (pandas (libs ) index.pyxinpandas._ libs.Inde ex hashtable _ class _ helper.pxinpandas . hashtable _ class _ helper.pxiinpandas._ libs.hashtable.pyobjecthashtable.get _ item (密钥错误3360 ' arrival ' Ception 3360关键点输入- 44-f2c 151 b e63 eainmodule----1arrival date=schedule [ ' arrival ' ] d 333 site frame.py in __getitem__(self, key ) 2904 if self.columns.nlevels 1:2905 return self._ getitem _ multi level (key )-2906 indexer=self.columns.ggey de xer ] d : (anaconda (lib (site-packages ) pandas ) core tolerance (2898返回自我. _ engine.get _ loc ) casted 已检查fromerr 29012902 iftoleranceisnotnone 3360密钥错误: ' arrival '数据框中是否存在名为" arrival "的列,但仍报告错误。 之后,在Arrival后面加了空格,正常工作了。
`