99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線電話:13121318867

登錄
2021-01-29 閱讀量: 1455
Python報(bào)錯(cuò):AttributeError: 'float' object has no attribute 'lower'

問:

Python報(bào)錯(cuò):AttributeError: 'float' object has no attribute 'lower'

image.png


答:

出現(xiàn)以上報(bào)錯(cuò)是因?yàn)閿?shù)據(jù)中存在的缺失值np.nan屬于float類型,float型數(shù)據(jù)不支持lower()方法,

所以會報(bào)'float' object has no attribute 'lower'錯(cuò)誤,可以通過Pandas的str屬性解決此問題,

使用str屬性會自動排除缺失值,代碼如下:

image.png


62.8491
0
關(guān)注作者
收藏
評論(0)

發(fā)表評論

暫無數(shù)據(jù)
推薦帖子