inplace
参数,将它设置为True
或将该函数的结果分配给你的数据框。# Solution 1: inplace = True:
abstract.dropna(how='all', inplace = True)
# do operation inplace your dataframe and return None.
# Solution 2: assign the function result to your own dataframe:
abstract = abstract.dropna(how='all')
# don't do operation inplace and return a dataframe as a result.
# Hence this result must be assigned to your dataframe
inplace
的取值为 False
。
df.head().to_dict()
开始。 - ALollzNaN
,即abstract.replace('', np.NaN).dropna(how='all')
。或者,你可以检查所有等于''
的位置,但我不确定你是否有一个DataFrame
或序列,并且在哪个轴上进行操作。 - ALollz