Skip to content
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

Put the Awkward-in-Pandas feature up for a vote. #351

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

jpivarski
Copy link
Member

Users are requested to explain their Awkward-in-Pandas use-cases on #350. If there aren't any applications (that couldn't be done in other ways), then this feature will be removed before Awkward1 really becomes 1.0.

>>> import awkward1 as ak
>>> import pandas as pd
>>> pd.DataFrame({"array": ak.Array([[1, 2, 3], [], [4, 5]])})
RuntimeError: You seem to be trying to use an Awkward Array as a Pandas Series or DataFrame column. This is
currently allowed if you first call

    ak.pandas.register()

but it is being considered for deprecation. See

    https://github.com/scikit-hep/awkward-1.0/issues/350

for reasons why it may be removed and explain your use-case there if you don't want it to be removed. Note
that this is distinct from

    ak.pandas.df(array)
    ak.pandas.dfs(array)

which may work better for you anyway, depending on what you're trying to accomplish.
>>> ak.pandas.register()
>>> pd.DataFrame({"array": ak.Array([[1, 2, 3], [], [4, 5]])})
       array
0  [1, 2, 3]
1         []
2     [4, 5]

@jpivarski jpivarski merged commit 0a5bbeb into master Jul 23, 2020
@jpivarski jpivarski deleted the jpivarski/pandas-extension-voting branch July 23, 2020 16:07
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.

1 participant