If your second dataframe in your upper screenshot is called df
, this should do:
df.set_index('Name').stack().reset_index(level=0)
2
solved Panda Data Manipulation
If your second dataframe in your upper screenshot is called df
, this should do:
df.set_index('Name').stack().reset_index(level=0)
2
solved Panda Data Manipulation