Return just the city and cups columns for the rows where cups is over 120 — in…
pandas · from [] vs .loc vs .iloc
df["col"].loc.iloc.at.iatlabel slicesposition slicesPutting the kettle on…
Starting up…
Exercise 3
Return just the city and cups columns for the rows where cups is over 120 — in a single .loc call.
your answer
stuck? the lesson behind it
[] vs .loc vs .iloc
Three ways in, three different questions — and the one that silently returns the wrong row.