AttributeError:'NoneType'对象没有属性'replace'数据框

时间:2020-04-19 21:36:49

标签: python dataframe replace

我正在尝试运行此代码:

data = data.replace('?', np.nan)
feat_miss = data.columns[data.isnull().any()] 

我收到此错误:

AttributeError                            
Traceback (most recent call last)
<ipython-input-61-c6f533504846> in <module>()

----> 5 data = data.replace('?', np.nan)
      6 feat_miss = data.columns[data.isnull().any()]

AttributeError: 'NoneType' object has no attribute 'replace'

0 个答案:

没有答案