Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理这个数据集,其中一列(LotFrontage)在 1460 个中有 259 个 Nan 值。所以当我使用 X.describe() 时,它显示 259 个空值。我试图用 0 填充这些空值。使用 isnull()。一旦我查看结果,所有 Nan 值都会正确填充零。但问题是,当我再次运行 X.describe() 时,它仍然显示 259 个 nan 值。我究竟做错了什么 ?请问有什么帮助吗?
Pandas 不会更改实际的 DataFrame。如果要更改实际的 DataFrame,则必须将就地参数作为 True
<your_dataframe>.fillna(value = 0, inplace = True)