Skip to content

Instantly share code, notes, and snippets.

@AnasAlmasri
Created May 9, 2020 17:56
Show Gist options
  • Save AnasAlmasri/823a9defed25327ce34fd004d370aba0 to your computer and use it in GitHub Desktop.
Save AnasAlmasri/823a9defed25327ce34fd004d370aba0 to your computer and use it in GitHub Desktop.
# combine all yearly dataframes into one dataframe
df = pd.concat(df_yearly)
# reverse dataframe so that oldest story has the smallest index
df = df.iloc[::-1]
# reset index to remove overlapping indices across dataframes
df.reset_index(drop=True, inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment