Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Added awkward.frompandas() for intuitive DataFrame -> Tables conversion #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NumesSanguis
Copy link

Initial support for a simple function that converts a Pandas DataFrame to an Awkward Tables. The new awkward.frompandas(dataframe) does:
return awkward.Table({name: dataframe[name].values for name in dataframe.columns})

Closes #215

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

This is a pretty simple function, and I approve! I don't require it, but you might want to add a simple unit test anywhere in the testing suite that makes sense. You can also increase the last digit of the version number to one higher than the latest release. That just means I'll be able to deploy it right away.

Since I have no objections, I can merge this anytime you're happy with it. But please do explicitly tell me when to merge, so that I don't merge it while you're making some last-minute change, like adding a test or something.

@NumesSanguis
Copy link
Author

I also think a unit test is a good idea. I hope I'll get to it soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for .frompandas() function
2 participants