plydata.one_table_verbs.ungroup¶
-
class
plydata.one_table_verbs.
ungroup
(*args, **kwargs)[source]¶ Remove the grouping variables for dataframe
- Parameters
- data
dataframe
, optional Useful when not using the
>>
operator.
- data
Examples
>>> import pandas as pd >>> df = pd.DataFrame({'x': [1, 2, 3], ... 'y': [1, 2, 3]}) >>> df >> group_by('x') groups: ['x'] x y 0 1 1 1 2 2 2 3 3 >>> df >> group_by('x') >> ungroup() x y 0 1 1 1 2 2 2 3 3