starepandas.STAREDataFrame.to_stare_singllevel#

STAREDataFrame.to_stare_singllevel(level=None, inplace=False)#

Changes the STARE index values to single level representation (in contrary to multiresolution).

Parameters
level: int

level to change thre

inplace: bool

If True, modifies the DataFrame in place (do not create a new object).

Returns
if not inplace, returns stare index values, otherwise None

Examples

>>> import geopandas
>>> world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
>>> germany  = world[world.name=='Germany']
>>> germany = starepandas.STAREDataFrame(germany, add_sids=True, level=6, add_trixels=False)
>>> len(germany.sids.iloc[0])
43
>>> germany_singleres = germany.to_stare_singllevel()
>>> len(germany_singleres.sids.iloc[0])
46