我有一个dataframe,其中的列都是布尔值(1或0),但是有些列的值无效,比如:111、10、11。我需要通过删除包含无效值的数据行来清除数据。但是在清除非布尔值之前,第一列是Age,我需要通过将它们放在18-150的范围内来清理行,因为有700或600这样的值。在
cleandata4bestdeal2=cleandata4bestdeal.dropna(axis=0,how=any,inplace = False)
我已经删除了值为NaN
的行,但我正在使用上面的方法删除所有非布尔值。
CleanDataFrame
Tags:
相关问题 更多 >
编程相关推荐