Ranking, splitting into quantiles with Python

InterviewQs

Ranking, splitting into quantiles with Python

Data Analysis Python Pandas Statistics Data Manipulation Quantiles

Forward this email to a friend or colleague and challenge them to solve it.

Suppose you're given a large table containing student grades, with the following structure:

age favorite_color grade name
0 20 blue 88 Willard Morris
1 19 blue 95 Al Jennings
2 22 yellow 92 Omar Mullins
3 21 green 70 Spencer McDaniel
4 21 green 94 Linda Ugo
5 20 blue 90 Susy Smith

You can assume the records below are a preview, and go on for some length.

Question:

Using Python, add a column with the student ranking in ascending order by 'grade'.

Next, calculate the following summary statistics for the student grades:

  • median grade
  • 25th percentile grade
  • 75th percentile grade

Click here to view this problem in an interactive Colab (Jupyter) notebook.



 

Congratulations! You’ve accumulated 164 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

TV and hypertension case study - Hours spent watching TV

Monday, July 19, 2021

Python, Statistics, T-test, External Dataset, InterviewQs TV and hypertension case study - Hours spent watching TV Python Statistics T-test External Dataset Forward this email to a friend or colleague

Find n-th missing element in unsorted array

Friday, July 16, 2021

Python, Data Structures, Arrays, InterviewQs Find n-th missing element in unsorted array Python Data Structures Arrays Forward this email to a friend or colleague and challenge them to solve it.

Employee survey results

Friday, July 16, 2021

SQL, Database Querying, InterviewQs Employee survey results SQL Database Querying Forward this email to a friend or colleague and challenge them to solve it. You're consulting for a company, and

Consumer complaints on financial products

Monday, July 12, 2021

Data Analysis, Python, Pandas, Data Manipulation, External Dataset, InterviewQs Consumer complaints on financial products Data Analysis Python Pandas Data Manipulation External Dataset Forward this

Subarrays having a sum of p

Saturday, July 10, 2021

Python, Data Structures, Arrays, InterviewQs Subarrays having a sum of p Python Data Structures Arrays Forward this email to a friend or colleague and challenge them to solve it. Suppose you have an

You Might Also Like

The best AI chatbot for coding

Tuesday, April 23, 2024

9 video gadget must-haves; 6 things Linux should borrow from MacOS -- ZDNET ZDNET Tech Today - US April 23, 2024 placeholder Can Meta AI code? I tested it against Llama, Gemini and ChatGPT - it wasn

Do I get to put your AI idea in front of 100K people?

Tuesday, April 23, 2024

If you build something great, I want to tell the world about it ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

UnitedHealth breach may affect huge portion of US citizens

Tuesday, April 23, 2024

The Change Healthcare ransomware attack has led to a massive leak of US healthcare data View this email online in your browser By Alex Wilhelm Tuesday, April 23, 2024 Good morning, and welcome to

LW 130 - Building a Product Configurator

Tuesday, April 23, 2024

Building a Product Configurator Shopify Development news and articles Issue 130 - 04/23/2024 Read Online Liquid Weekly All Things Shopify Development How to Sell Personalized Products on Shopify 2024 -

New public workshop in June: architecting for fast flow

Tuesday, April 23, 2024

Get the early bird discount You are receiving this email because you subscribed to the microservices.io mailing list. Helping organizations accelerate software delivery I provide consulting and

Pnpm v9.0.0; Biome v1.7; ESLint v9.1.0; Node.js collaboration summit; Intl.Segmenter; tree shaking;

Tuesday, April 23, 2024

We have 9 links for you - Stay up-to-date on JavaScript and tools WorkOS, the modern API for auth and user identity. workos.com Sponsor WorkOS enables B2B SaaS companies to accelerate enterprise

New on VC+: Our Visual Briefing on the IMF's World Economic Outlook Report 🔮

Tuesday, April 23, 2024

We've compiled a visual analysis of the most important takeaways from IMF's latest report. View email in browser EXCLUSIVE PREVIEW Upcoming on VC+: Our Key Takeaways from IMF's World

Meta teases a limited-edition, Xbox-inspired Quest headset

Tuesday, April 23, 2024

The Morning After It's Tuesday, April 23, 2024. Meta announced it's opening up the Quest's operating system to third-party companies, allowing them to build headsets of their own. The Quest

Post from Syncfusion Blogs on 04/23/2024

Tuesday, April 23, 2024

New blogs from Syncfusion What's New in Blazor Query Builder: 2024 Volume 1 By Satheeskumar S This blog explores the new features added in the Syncfusion Blazor Query Builder component as part of

Police Chiefs Call for Solutions to Access Encrypted Data in Serious Crime Cases

Tuesday, April 23, 2024

THN Daily Updates Newsletter cover Java All-in-One For Dummies, 7th Edition ($27.00 Value) FREE for a Limited Time A beginning coder's resource for learning the most popular coding language