Entries in a dataframe are deleted by the method drop.
Again, we use the dataframe from the previous section:
town=pd.DataFrame(towns, columns=['City','Country','area','population'])
town.set_index('City', inplace=True)
An entire row is deleted by:
town.drop('Bergen', axis=0)
The parameter axis specifies here that we look for a row. Deleting a row requires the column label and the correct parameter axis:
town.drop('area', axis=1)