Created
June 23, 2021 14:01
-
-
Save StephenFordham/0eaddaeea848bc75bb7d756db54a85b3 to your computer and use it in GitHub Desktop.
data_shaping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keys = [i for i in range(65)] | |
all_dataframes = {} | |
for i, county in zip(keys, df['Provider County'].unique()): | |
df2 = df[df['Provider County'] == county].sort_values('Year', ascending=True) | |
all_dataframes[i] = df2 | |
master_df = [] | |
for i in all_dataframes: | |
master_df.append(all_dataframes[i]) | |
df_all = pd.concat(master_df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment