df.loc[(数据['Perkotan'].isnull()==true),'Perkotan']=df['Perkotan'].mean()df.loc[(数据['Perdesan'].isnull()==true),'Perdesan']=df['Perdesan'].mean()
get_loc(self,key,method,tolerance)2897 try:->2898 return self.\u engine.get_loc(casted_key)2899中的keyerror回溯(最近一次调用)/usr/local/lib/python3.7/dist-packages/pandas/core/index/base.py
pandas/_libs/index.pyx在pandas中。_libs.index.indexengine.get_loc()
pandas/_libs/index.pyx在pandas中。_libs.index.indexengine.get_loc()
pandas/_libs/hashtable_class_helper.pxi在pandas._libs.hashtable.pyobjecthashtable.get_item()中
pandas/_libs/hashtable_class_helper.pxi在pandas._libs.hashtable.pyobjecthashtable.get_item()中
keyerror:“perkotaan”
上述异常是以下异常的直接原因:
get_loc(self,key,method,tolerance)2898返回self.get_loc(casted_key)2899除keyerror as err:->2900从err 2901 2902中提升keyerror(key),如果容差不是无:
keyerror:“perkotaan”
暂无答案!
目前还没有任何答案,快来回答吧!