Aiphabet

>>>Task

Grouping and summarising

  1. Create readings — a DataFrame with the columns city and temperature
  2. Create by_city — the average temperature per city, using groupby
  3. Create warmest — the name of the warmest city, as a str
  4. Create lisbon_average — Lisbon's average, as a float
  5. Print exactly:
Warmest: Cairo
Lisbon averages 22.67

The solution unlocks after a few minutes.

Editorstarting python
Ctrl + Enter
Output
Run your code to see the output.
Checks0 of 6 passing
  • Groups with groupby
  • by_city is one average per city
  • warmest is Cairo
  • lisbon_average is 22.67
  • Prints both lines
  • Works when the temperatures change