Add a band column that is "busy" where cups is over 100 and "quiet" otherwise,…

pandas · from Adding and changing columns

df["new"] =.assign()np.wherepd.cut.loc[mask, col] =Copy-on-Write

Putting the kettle on…

Starting up…

Exercise 3

Add a band column that is "busy" where cups is over 100 and "quiet" otherwise, and return the frame.

your answer
stuck? the lesson behind it
Adding and changing columns
Creating columns, and the chained assignment that silently does nothing.