0

I am trying to map float pd.Series with high SD:

>>>pd.Series(foo).describe()
count    3.351198e+07
mean    -2.337614e+02
std      4.788547e+04
min     -9.999999e+06
25%      0.000000e+00
50%      0.000000e+00
75%      0.000000e+00
max      7.499913e+07

>>>pd.Series(foo).std()
47885.47066964969

It is highly centered around 0 but has big tails and outliers on both sides. So far I tried sns.distplot() with log scale but it only works on absolute values and I am interested in seeing difference on both sides. How can I visualize in more detail both tails ?

my code so far:

bins = [0, 10, 100, 1000, 10000, 100000, 100000, 100000000]
bins = [-i for i in bins[:1:-1] ] + bins
g = sns.distplot(foo.values,bins=bins,kde=False)
g.set_xscale('log')

enter image description here

euh
  • 319
  • 2
  • 11
  • 1
    First off, `sns.distplot` is an old function. You can use `sns.histplot()` instead. Also, the function returns an `ax`, not a `FacetGrid`. The negative values are in their appropriate bin, but setting `ax.set_xscale('log')` makes them invisible. You could set `ax.set_xscale('symlog')` instead. – JohanC Feb 15 '23 at 14:42
  • Thanks! This helped me tweak it further! – euh Feb 15 '23 at 15:24

0 Answers0