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
Without the modification, the return value is a dataframe with the apply-returned Series objects concatenated. With the modification, it is a Series object filled with the individual Series objects.
Expected Output
The same behavior with and without modification.
Background
The divergence in the behavior is caused by the code in pandas/core/index.py introduced in #10703, which was a reaction on #10697. Simply commenting out the if block if all( isinstance(e, tuple) for e in data ): solves the issue.
The text was updated successfully, but these errors were encountered:
Ok, digging deeper in the code, I realize that using tuples inside indexes probably won't really work well with pandas, because there's too much "tuple detection" all over the place.
Code Sample, a copy-pastable example if possible
This is adapted from the docs, just replacing column 'a' with a list of tuples:
Problem description
Without the modification, the return value is a dataframe with the apply-returned Series objects concatenated. With the modification, it is a Series object filled with the individual Series objects.
Expected Output
The same behavior with and without modification.
Background
The divergence in the behavior is caused by the code in
pandas/core/index.py
introduced in #10703, which was a reaction on #10697. Simply commenting out the if blockif all( isinstance(e, tuple) for e in data ):
solves the issue.The text was updated successfully, but these errors were encountered: