One chain: add price, then keep only rows where price is above 20

pandas · from Method chaining

chaining.assign().pipe().query().loc[lambda]inplace is a trap

Putting the kettle on…

Starting up…

Exercise 3

One chain: add price, then keep only rows where price is above 20. The second step has to see the column the first one made.

your answer
stuck? the lesson behind it
Method chaining
One expression, no half-modified frames, and the same answer every time you run it.