什么是从pandas DataFrame中删除nan和inf/-inf值而不重置的最快/最简单的方法mode.use_inf_as_null
?我希望能够使用subset
和how
参数dropna
,除了inf
被认为缺失的值,例如:
df.dropna(subset=["col1", "col2"], how="all", with_inf=True)
Run Code Online (Sandbox Code Playgroud)
这可能吗?有没有办法告诉dropna
我inf
在其缺失值的定义中包含哪些内容?