Introduction
Series
What DataFrames are
DataFrame columns
DataFrame rows
20. Resetting the index
Filtering rows and columns
Filtering data frames
Sorting rows
Summary

Instruction

Great. To return to the default integer index, you can use the following code:

hospitals = hospitals.reset_index(drop=True)

If we provide reset_index() without any arguments or with the drop=False, it will add back the old index column (in our case, the Phone Number column). We don’t want that additional column, so we added drop=True inside the parentheses.

Exercise

Reset the index of eu_states. Keep the Country column in the DataFrame.

Stuck? Here's a hint!

Use

reset_index(drop=False)
on eu_states.