Skip to content

Instantly share code, notes, and snippets.

@shinokada
Created June 23, 2020 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinokada/bd3d3d3d0013490bef2c85b925ef2d6f to your computer and use it in GitHub Desktop.
Save shinokada/bd3d3d3d0013490bef2c85b925ef2d6f to your computer and use it in GitHub Desktop.
df=pd.melt(df,id_vars=['race'],var_name='gender', value_name='value')
df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment