使用过这个 df.fillna(method="pad") 但是没有奏效,是因为不是 nan 吗?
使用过这个 df.fillna(method="pad") 但是没有奏效,是因为不是 nan 吗?
1
Les1ie Oct 20, 2018
df.fillna("something", inplace=True)
|
3
Les1ie Oct 22, 2018
加了 inplace=True 才会替换当前变量,没加的会返回一个新的对象,
所以你的问题是这个地方不是 NaN 么.., 不过我遇到的空值都是 NaN 呀.. |