-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected interaction in DataFrame.apply(f) when f
returns a list
#18919
Labels
Apply
Apply, Aggregate, Transform, Map
Duplicate Report
Duplicate issue or pull request
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
Comments
duplicate of many issues, se #18557 which will close. |
jreback
added
Apply
Apply, Aggregate, Transform, Map
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
labels
Dec 23, 2017
jreback
added a commit
to jreback/pandas
that referenced
this issue
Dec 28, 2017
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Dec 30, 2017
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 6, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 6, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 6, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 12, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 13, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 14, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 15, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 16, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 21, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 27, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 1, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 4, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 5, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 6, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 6, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
jreback
added a commit
to jreback/pandas
that referenced
this issue
Feb 7, 2018
closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
harisbal
pushed a commit
to harisbal/pandas
that referenced
this issue
Feb 28, 2018
…-dev#18577) closes pandas-dev#16353 closes pandas-dev#17348 closes pandas-dev#17437 closes pandas-dev#18573 closes pandas-dev#17970 closes pandas-dev#17892 closes pandas-dev#17602 closes pandas-dev#18775 closes pandas-dev#18901 closes pandas-dev#18919
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Apply
Apply, Aggregate, Transform, Map
Duplicate Report
Duplicate issue or pull request
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Code Sample, a copy-pastable example if possible
Problem description
When a
DataFrame
has aMultiIndex
, and the function passed toDataFrame.apply
returns alllist
s, weird stuff happens and an unintelligible error occurs.What ends up happening is that the result somehow gets coerced to a list of arrays (not sure where or why the list->array conversion happens), and then submitted to
DataFrame.__init__
, which tries to massage it that into a DataFrame, and fails.Resulting error:
ValueError: Empty data passed with indices specified.
, emitted from deep within the bowels ofpandas/core/internals.py
, specificallycreate_block_manager_from_arrays
.This happens regardless of what the
reduce=
argument is set to.Expected Output
Don't try to manipulate the output. Return a
Series
oflist
s.In the example above, that'd be:
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: