Python 剪辑和标记

问题描述

给定以下数据集:

enter image description here

需要使用分位数裁剪值,但同时标记那些已修改的值。

enter image description here

这是剪辑但没有标志的示例代码

p_05 = df["Value"].quantile(0.05) # 5th quantile
p_95 = df["Value"].quantile(0.995) # 95th quantile
df["Value"].clip(p_05,p_95,inplace=True)

有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)