Can we check the data in a pandas.core.groupby.SeriesGroupBy
object?
Sure, just use
df.groupby(column).head()
It shows you the first n rows (default: 5).
First option: iterate over all groups.
for name, group in df.groupby(column):
print(name)
print(group)
print('\n')
Second option: if you want to see the group for a specific value, use the get_group
method.
df.groupby(column).get_group(name)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With