0

I am using pandas dataframe (python), it is currently in this format:

df = enter image description here

I am trying to convert the above dataframe into a new dataframe in below format:

new_df = enter image description here

I am trying to avoid doing this using a lot of code as performance will be impacted, is there some dataframe function that can be used to achieve this?

user5711693
  • 113
  • 5
  • 17

0 Answers0