Exporting Dataframe from Python to Excel by Group

Viewed 16

I have the below dataframe:

Group Location
A AZ
A NY
A FL
B CA
B WY
B NV
C LA
C MS
C CO

I would like to create 3 different excel sheets (within the same document), each with information about one group. For example:

Sheet 1:

Group Location
A AZ
A NY
A FL

Sheet 2:

Group Location
B CA
B WY
B NV

Sheet 3:

Group Location
C LA
C MS
C CO

Any help would be appreciated. I know how to export to excel but not into different sheets.

0 Answers
Related