-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
ApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapDocsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode
Milestone
Description
Code Sample, a copy-pastable example if possible
pd.DataFrame({'col_1':['val_1','val_2','val_3']}).apply(lambda row: [1], axis=1, reduce=True)
Problem description
Per the documentation, calling Dataframe.apply w/ reduce=True should always produce a Series. However, if the applied function returns list values Dataframe.apply returns a Dataframe, not a Series.
Expected Output
When called with reduce=True, I expect Dataframe.apply to produce a Series where each element is a list, not a Dataframe.
Output of pd.show_versions()
0.18.1
guzmanojero
Metadata
Metadata
Assignees
Labels
ApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapDocsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode