🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Feature Engineering: all 10 questions

Quiz: Feature Engineering · Question 10 of 10

What does pd.cut(ages, bins=[0, 21, 25, 100], labels=["≤21", "22-25", "26+"]) do?

What does pd.cut(ages, bins=[0, 21, 25, 100], labels=["≤21", "22-25", "26+"]) do?

  1. A.Deletes ages above 25
  2. B.Groups each age into one of three labelled bands
  3. C.Scales ages to between 0 and 1
  4. D.One-hot encodes every distinct age
Answer & explanation

Correct answer: Groups each age into one of three labelled bands

Binning turns a number into ordered categories.

Can you get the rest right without peeking?

Take the timed Quiz: Feature Engineering quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →