Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to unpivot dataframe pandas

df_unpivoted = df.melt(id_vars=['car_model'], var_name='date', value_name='0-60mph_in_seconds')
df_unpivoted
Source by dfrieds.com #
 
PREVIOUS NEXT
Tagged: #unpivot #dataframe #pandas
ADD COMMENT
Topic
Name
2+5 =