Skip to content

Handling Multidimensional Pandas Dataframe #93

Answered by sybrenjansen
harmojd asked this question in General
Discussion options

You must be logged in to vote

By default MPIRE applies argument unpacking. I.e., it defaults to starmap. That is your problem here.

Luckily, you can easily avoid that. Please have a look at https://sybrenjansen.github.io/mpire/usage/map/map.html#circumvent-argument-unpacking, which should provide you with all the details you need.

It basically comes down to changing this line slightly:

series = [x[1] for x in df.groupby("id").__iter__()]

to:

series = [(x[1],) for x in df.groupby("id").__iter__()]

And then it should work

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@bleninr
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@bleninr
Comment options

Answer selected by sybrenjansen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants