DEV Community

Durga Pokharel
Durga Pokharel

Posted on

3 2

Day 63 Of 100DaysOfCode: Pandas Dispersion

This is my 63th day of #100DaysOfcode and #python learning. Like yesterday today continue to learn from datacamp about pandas. Here is code for inter quantile range.

Pandas code

# Calculate mean
mean = income['Income per Capita'].mean()

# Calculate standard deviation
std = income['Income per Capita'].std()

# Calculate and print lower and upper bounds
bounds = [mean-std,mean + std]
print(bounds)

# Calculate and print first and third quartiles
quantiles = income['Income per Capita'].quantile([0.25, 0.75])
print(quantiles)

# Calculate and print IQR
iqr = quantiles[0.75] - quantiles[0.25]
print(iqr)
Enter fullscreen mode Exit fullscreen mode

Day 63 Of #100DaysOfCode and #python
* Pandas (Dispersion) from https://t.co/EAEFp0OZwYDatacamp#womenintech #100DaysOfCode #CodeNewbie #DEVCommunity pic.twitter.com/EJSKaXbrgF

— Durga Pokharel (@mathdurga) March 1, 2021

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay