Quantcast
Viewing all articles
Browse latest Browse all 4448

Extract Row & Column from DataFrame using Box plot

Date A B C
01-01-2020 1 14 3
02-02-2020 100 3 15
03-03-2020 4 4 4
This is the sample format. I used
q1 = df.quantile(0.25)
q3 = df.quantile(0.75)
iqr = q3 - q1
filter = df[(df >= q1 - 1.5iqr) & (df <= q3 + 1.5iqr).any(axis=1)]
filter
Respected output for the above script:
Date A B C
01-01-2020 1 14 3
02-02-2020 100 3 15

But I want an output like, can someone help in this part.
Date Column Value
01-01-2020 B 14
02-02-2020 A 100
02-02-2020 C 15

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles