【发布时间】:2019-12-11 20:12:13
【问题描述】:
我有一个如下的数据框。
id date name branch position
0 20323 2019-02-03 Bete H IE
1 20326 2019-02-03 Veso R MGR
2 22357 2019-02-03 Nom D IE
3 20935 2019-02-06 Dow A MGR
4 NaN NaT NaN NaN NaN
5 20432 2019-02-07 Tem W MGR
6 23999 NaT Bonny NaN NaN
7 21102 2019-02-07 Xi A IE
我只想删除空白行(例如:索引 4)。
我尝试使用df = pd.read_excel("../20191210/test.xlsx", skip_blank_lines=True)读取数据文件。
但是和df = pd.read_excel("..20191210/test.xlsx")的结果没有区别
Here 是文件的下载链接。
谁能帮我解决这个问题?
【问题讨论】:
-
我认为 df.dropna(how='all') 就足够了
-
我们应该如何帮助从 Excel 中读取没有任何数据或文件本身的文件?
-
@AlexanderCécile 对不起!我添加了下载文件的 URL