user16527549
user16527549

Reputation: 5

How to extract values that is 15% greater than mean in pandas

Please refer to the picture for the dataframeSet of data frames

I got the mean of dividends with: mean=df["Dividends"].mean()

and got the values that exceeded 15% of mean with: exc=mean+mean*0.15

The question is how do I display values that exceeded 15% of the mean? or is there any easier ways to do it?

Upvotes: 0

Views: 77

Answers (1)

Rafa
Rafa

Reputation: 684

df[df['Dividents'] >= (df['Dividents'].mean() * 1.15)]

Upvotes: 2

Related Questions