pandas groupby iterate over groups code example
Example: loop through groupby pandas
grouped = df.groupby('group')
for group_name, group in grouped:
print('\nCREATE TABLE {}('.format(group_name))
print(group["column"])
grouped = df.groupby('group')
for group_name, group in grouped:
print('\nCREATE TABLE {}('.format(group_name))
print(group["column"])