-1

how can I return a list of string values for first column (State) from below DataFrame?

                             Population
State       County  
California  Los Angeles County  9818605
Illinois    Cook County         5194675
Texas       Harris County       4092459
Peter
  • 553
  • 3
  • 7
  • 15

1 Answers1

0

last bit is solved: converting index to list with: df.index.get_level_values(0).tolist()

Many thanks for your help! Peter

Peter
  • 553
  • 3
  • 7
  • 15