×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: dan darm
Added: Mar 19, 2021 12:08 PM
Modified: Apr 7, 2021 10:52 PM
Views: 4792
Tags: pandas
  1. groups = df.groupby('A')
  2.  
  3. for key, item in groups:
  4.     print(groups.get_group(key), "\n\n")
  5.  
  6.  
  7. # oppure
  8. primo = list(groups)[0]