Normalizing student grades against median

InterviewQs

Normalizing student grades against median

Data Analysis Python Pandas Data Manipulation Normalization

You are given a dataframe containing student information, named df (shown below). Suppose you want to normalize each student's grade based on the group's median age.

Age Favorite Color Grade Name
20 blue 88 Willard Morris
19 blue 95 Al Jennings
22 yellow 92 Omar Mullins
21 green 70 Spencer McDaniel

Write a function using Python (Pandas) that will add a new column to your dataframe containing a new grade normalized against the median age of the students.



 


Congratulations! You’ve accumulated 128 questions in your account. Upgrade to premium to access detailed solutions to each problem (including this one).

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

Older messages

Identity Matrix

Friday, April 23, 2021

Data Interview Qs Identity Matrix Python Data Structures Arrays Matrix Can you build a function that prints an identity matrix, given the identity matrix size? Examples: Input: 2 Output: 1 0 0 1 Input:

Animal weights

Wednesday, April 21, 2021

Data Interview Qs Animal weights SQL Database Querying Suppose you're given the below tables, containing animal weights, as well as a directory of zoos: Table name: animal_weights animal_ID

Parking space probabilities

Monday, April 19, 2021

Data Interview Qs Parking space probabilities Data Analysis Python Pandas External Dataset Data Manipulation Data Visualization Statistics Probability Mass Function Suppose you're analyzing the

Sorting algorithm

Wednesday, April 14, 2021

Data Interview Qs Sorting algorithm Python Algorithms Given the following Python function, write out what the output would be at each stage: n = 1 while n < 3: m = n + 1 while m < 4: m += 1 print

Avg. sales by location in SQL

Monday, April 12, 2021

Data Interview Qs Avg. sales by location in SQL SQL Database Querying You are given the below tables, showing Store, Product, and Sales information for a chain of grocery stores. The columns are

You Might Also Like

🎮 Forget the PS5 Pro, I Still Love My PS4 — The Best Lock Screen Widgets for iPhone

Friday, May 3, 2024

Also: Smart Home Mistakes to Avoid, and More! How-To Geek Logo May 3, 2024 Did You Know Half of the world's geysers are located in Yellowstone National Park. 🔑 More Passkeys Happy Friday! You can

JSK Daily for May 3, 2024

Friday, May 3, 2024

JSK Daily for May 3, 2024 View this email in your browser A community curated daily e-mail of JavaScript news The Power of React's Virtual DOM: A Comprehensive Explanation Modern JavaScript

Musk raises $6B for AI startup

Friday, May 3, 2024

Also, is TikTok dodging Apple's commissions? View this email online in your browser By Haje Jan Kamps Friday, May 3, 2024 Welcome to Startups Weekly — Haje's weekly recap of everything you can

SWLW #597: Seek first to understand, The "Iterative Adjacent Possible", and more.

Friday, May 3, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

iOS Dev Weekly - Issue 659

Friday, May 3, 2024

Is Swift 6 hitting one of the REAL hard problems? Not generics, not data race safety, but naming things! 😬 View on the Web Archives ISSUE 659 May 3rd 2024 Comment Naming things is one of the two hard

Daily Coding Problem: Problem #1430 [Easy]

Friday, May 3, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. You have a large array with most of the elements as zero. Use a more space-

Making sense of product management

Friday, May 3, 2024

​ Getting a sense of product sense Whenever I hear the term product sense, I think back to a Seinfeld episode about write-offs (with a little artistic license). Jerry: “You don't even know what

Charted | The Carbon Footprint of Major Travel Methods 🌐

Friday, May 3, 2024

Transport accounts for nearly one-quarter of global energy-related CO2 emissions. This chart shows the carbon footprint of travel methods. View Online | Subscribe Presented by: Morningstar Discover the

Apple's AI Strategy, At Your Service

Friday, May 3, 2024

The relative calm before the "AI, AI, AI, AI, AI" storm... Apple's AI Strategy, At Your Service By MG Siegler • 3 May 2024 View in browser View in browser At one point during Apple's

5 gadgets I never fly without

Friday, May 3, 2024

How to save on internet; BYO AI; Gemini features we need; Prime Day 2024 -- ZDNET ZDNET Tech Today - US May 3, 2024 placeholder I fly 10 times a year. These 5 tech gadgets are lifesavers From recording