Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Oct 6, 2020

Fix a crash on conversion of e.g. struct of dictionaries.

…g array to Pandas

Fix a crash on conversion of e.g. struct of dictionaries.
@pitrou pitrou requested a review from kszucs October 6, 2020 13:11
@github-actions
Copy link

github-actions bot commented Oct 6, 2020


# Expected a Series of {field name: field value} dicts
rows_as_tuples = zip(*(child.to_pylist() for child in children))
rows_as_dicts = [dict(zip(names, row)) for row in rows_as_tuples]
Copy link
Member

@kszucs kszucs Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expanded the nested comprehension to make it a bit more readable.

Copy link
Member

@kszucs kszucs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Antoine! Merging on green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants