diff --git a/modern_3_indexes.ipynb b/modern_3_indexes.ipynb index ad33cbd..4e0cb34 100644 --- a/modern_3_indexes.ipynb +++ b/modern_3_indexes.ipynb @@ -756,7 +756,7 @@ "\n", "flights = pd.read_hdf('data/flights.h5', 'flights')\n", "\n", - "weather_locs = weather.index.levels[0]\n", + "weather_locs = weather.index.get_level_values('station')\n", "# The `categories` attribute of a Categorical is an Index\n", "origin_locs = flights.origin.cat.categories\n", "dest_locs = flights.dest.cat.categories\n",