I'm new to python, so please forgive me if this is a stupid question.
I'm trying to separate a bigger dataset into smaller data frames based on a unique row value (station ID). I've done the following, which made a dict and did separate them into smaller data frames, but within this dict?
dfs = dict(list(df.groupby('Station')))
when I open it in Jupyter it only shows the station ID next to a number series (0-20).
is there a way to name these smaller data frames to the station ID? I'm used to R/tidyverse so there has to be a way to do this easily?
Thank you! S
tried the following too:
dct = {}
for idx, v in enumerate(df['Station'].unique()):
dct[f'df{idx}'] = df.loc[df['Station'] == v]
print(dct)
but just names them df1, df2, df3, etc.