Add a price column to a copy of orders — revenue / cups — and return the frame
pandas · from Adding and changing columns
df["new"] =.assign()np.wherepd.cut.loc[mask, col] =Copy-on-WritePutting the kettle on…
Starting up…
Exercise 1
Add a price column to a copy of orders — revenue / cups — 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.