I want to dissolve a dataframe grouped by two columns. However, in the documentation of the Dissolve function only one column is provided:
GeoDataFrame.dissolve(by=None, aggfunc='first', as_index=True,
level=None, sort=True, observed=False, dropna=True)
The columns of the dataframe can be thought of like this:
State, Districts, City, Number_Inhabitantes
Instead of the syntax given in the documentation, I would like to do something similar to this, to get the number of Inhabitants per District instead of having the Number of Inhabitantes per city:
GeoDataFrame.dissolve(by= "State"&"Districts",aggfunc={"Number_Inhabitantes": "count"} )
Is there a way to do this?