I have a pandas Series of sorted percentage values like this :
A -> 0.001
B -> 0.0012
C -> 0.0015
...
H -> 0.02
I -> 0.03
J -> 0.041
...
X -> 0.12
Y -> 0.31
Z -> 0.4
(I typed those by hand, I am not familiar with how to type those python outputs in DSSE, sorry! If anyone has a hint on that, it would be nice. If this pandas series would be named "content_distribution", content_distribution.X would return the float 0.12 .)
I want to obtain a Series which looks like this :
Other -> 0.07
I -> 0.03
J -> 0.041
...
X -> 0.12
Y -> 0.31
Z -> 0.4
because those small values are irrelevant to display in a plot that I want to make, and I want to keep the big values on display. Is there any pandas-ic or pythonic way to do that? I can write my own script, but anything I try out looks non-pandas-ic (even though it sort of works).
(I also don't know if "aggregating" is the correct pandas term for this, if anyone has a better one, he or she is welcome to edit my title.)