【发布时间】:2018-05-21 03:58:41
【问题描述】:
在 python 中编辑大型数据框。如果特定列的行的值为 0.0,如何删除数据框中的整行?
当我在总体满意度列中删除 0.0 时,编辑不会显示在大型数据框的散点图矩阵中。
我试过了:
filtered_df = filtered_df.drop([('overall_satisfaction'==0)], axis=0)
还尝试用空值替换 0.0 并删除空值:
filtered_df = filtered_df.['overall_satisfaction'].replace(0.0, np.nan), axis=0)
filtered_df = filtered_df[filtered_NZ_df['overall_satisfaction'].notnull()]
我缺少什么概念?谢谢:)
【问题讨论】:
-
@coldspeed 你修好了!!非常感谢你!我是这个网站的新手,我一定会回来的。 =D
标签: python pandas numpy dataframe floating