python - 使用 IQR 删除异常值会给出错误“对象类型系列没有名为 1 的轴”
问题描述
在使用 IQR 从列中删除异常值时,它向我显示错误 - 'No axis named 1 for object type Series'
df = df[~((df['DISTANCE_FROM_HOME'] < (q1 - 1.5 * iqr))
|(df['DISTANCE_FROM_HOME'] > (q3 + 1.5 * iqr))
).any(axis=1)]
解决方案
推荐阅读
- powershell - 在不同域之间复制数据
- batch-file - 批量“for”命令从 TSV 文件中提取列
- session - pine 脚本 v4:会话范围问题
- c++ - Z3:如何在不使用硬编码索引的情况下从 model() 访问变量?
- android - DefaultNetworkCallback 用于检查网络连接未成功更新全局状态变量
- email - OpenDKIM 在同一封电子邮件中签名信封发件人和信头发件人
- javascript - 图片未上传到 Firebase 存储桶中
- c# - Swagger 文档在执行时是否创建控制器或路由(C# Rest Api)?
- excel - 如何告诉 VBA 根据单元格值将文件保存在特定文件夹中?
- networking - 为什么套接字连接的基本抽象并不常见?