Jupyter 中数据帧的column数据转换报错:cannot
2020-10-14 本文已影响0人
我住永安当
![](https://img.haomeiwen.com/i14058594/ea6292cc53091653.png)
查看空值的len:
import numpy as np
sales_customer_order_11[sales_customer_order_11['birth_year'].isin([np.NaN])]
数量并不多,直接筛选掉即可:
sales_customer_order_11['birth_year'] = sales_customer_order_11[~sales_customer_order_11['birth_year'].\
isin([np.NaN])]['birth_year'].astype('int')