-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
Pandas Groupby actually works pretty well out of the box for nested-pandas use cases, things like below work natively because the pandas groupby object actually preserves the nestedframe dtype of the input dataframe when passed along to functions like apply:
from nested_pandas.datasets import generate_data
nf = generate_data(5,10, seed=1)
nf["c"] = [0,0,1,1,1]
def test_func(df):
return df["nested"].nest.to_flat()
nf_groups = nf.groupby("c").apply(test_func, include_groups=False)
Therefore, rather than a wrapper for this, I think it would be good to add one or two examples to the docs just highlighting that this functionality is available within nested-pandas
hombit
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers