I have flight's seaborn dataset.
import seaborn as sns
flights = sns.load_dataset('flights')
flights.groupby(['year']).sum()
when i run this, i get error like :
TypeError: category type does not support sum operations
facing this issues in clusteMap and Lineplot
your Assistence will be Appreciated!
This snippet works in pandas 1.* but not in pandas 2.
The issue is that the
monthcolumn has typecategory:In pandas 1.*, the
monthcolumn is automatically dropped because its type does not support thesummethod.To get to the same result in pandas 2, you'll want to specifically select the
passengerscolumn (and any other col of interest):yields: