0

I'm trying to create new rows based on existing columns in python pandas as I need to create visualizations. Can someone please help me if there is any easy way to create below example?

Here is a data:

Name   Age    1/5    2/5    3/5
---------------------------------
Kelly   14    Yes    No    Yes
Mason   15    No     Yes   Yes
Julia   16    Yes    No    No
Kat     16    Yes    No    Yes

Expected result:

Name   Age    Attendance 
---------------------------------
Kelly   14    Yes    
Kelly   14    No  
Kelly   14    Yes  
Mason   15    No     
Mason   15    Yes
Mason   15    Yes
Julia   16    Yes
Julia   16    No
Julia   16    No
Kat     16    Yes
Kat     16    No
Kat     16    Yes
Crystal
  • 23
  • 5

0 Answers0