Skip to content

Instantly share code, notes, and snippets.

@youssefHosni
Last active January 4, 2022 22:47
Show Gist options
  • Save youssefHosni/3907733e225adaca21f9b74df7e8f653 to your computer and use it in GitHub Desktop.
Save youssefHosni/3907733e225adaca21f9b74df7e8f653 to your computer and use it in GitHub Desktop.
demographics_df.drop(['Category', 'Topic'], axis=1 ,inplace=True) # droping categorey and topic columns
demographics_df = demographics_df.T
demographics_df = demographics_df.rename(columns=demographics_df.iloc[0]).drop(demographics_df.index[0])
demographics_df = demographics_df.reset_index().rename(columns={'index':'Neighborhood'})
demographics_df.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment