You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apply looks at the returned values from the user-supplied transformer function
and does convenient things based on the type returned.
However, there's no opt-out if you just want to transform groups
into something and get it back as-is:
In [16]: df=mkdf(10,2,data_gen_f=lambdax,y: randint(1,10))
...: df
...:
...:
...:
Out[16]:
C0C_l0_g0C_l0_g1R0R_l0_g091R_l0_g137R_l0_g281R_l0_g343R_l0_g453R_l0_g572R_l0_g641R_l0_g754R_l0_g897R_l0_g948In [17]: deff1(g):
...: returng.sort('C_l0_g0')
...: # group on the suffix of the running index
...: g=df.groupby(lambdakey: int(key.split("g")[-1]) >=5)
...: r=g.apply(f1)
...:
# we want to get a bunch of sorted dataframes, but get concat-ed against our willIn [18]: rOut[18]:
C0C_l0_g0C_l0_g1R0FalseR_l0_g137R_l0_g343R_l0_g453R_l0_g281R_l0_g091TrueR_l0_g641R_l0_g948R_l0_g754R_l0_g572R_l0_g897
More failed guessing of what the user wants: #5908.
The text was updated successfully, but these errors were encountered:
apply
looks at the returned values from the user-supplied transformer functionand does convenient things based on the type returned.
However, there's no opt-out if you just want to transform groups
into something and get it back as-is:
More failed guessing of what the user wants: #5908.
The text was updated successfully, but these errors were encountered: