-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Strange output from DataFrame.apply
when applied func creates a dict
#8735
Comments
This inference is done in cython. It is indeed trying to get the values attribute (e.g. Do you want something like this?
|
Hi all, I've run into the same issue myself. I actually need to pass a list of dicts for each row as my output, and it would be nice to be able to do
|
Hey, I still have this issue with my function returing a dict as part of aggregation |
well this was fixed in 0.17.0 |
Just had something odd come up while trying to come up with something for this SO question.
If we use
DataFrame.apply()
to try and create dictionaries from the rows of a dataframe, it seems to return thedict.values()
method rather than returning the dict itself.Looks like it's probably something to do with trying to grab the
values
attribute when the output of the applied function is a Series or something similar.Library versions:
The text was updated successfully, but these errors were encountered: