【发布时间】:2017-10-04 13:54:08
【问题描述】:
我正在尝试在 DataFrame 中查找空值。尽管我查看了 Stackoverflow 中描述确定空值的过程的以下帖子,但我很难为我的数据集做同样的事情。
How to count the Nan values in the column in Panda Data frame
工作代码:
import pandas as pd
a = ['america','britain','brazil','','china','jamaica'] #I deliberately introduce a NULL value
a = pd.DataFrame(a)
a.isnull()
#Output:
False
1 False
2 False
3 False
4 False
5 False
a.isnull().sum()
#Output
#0 0
#dtype: int64
我做错了什么?
【问题讨论】: