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

[Python] Segmentation fault when converting empty column as categorical #18783

Closed
asfimport opened this issue Apr 25, 2018 · 2 comments
Closed

Comments

@asfimport
Copy link

When converting an empty column to categorical in pandas I get a segmentation fault

Reporter: Florian Jetter / @fjetter
Assignee: Uwe Korn / @xhochy

Note: This issue was originally created as ARROW-2510. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Uwe Korn / @xhochy:
@fjetter I cannot reproduce the behaviour I expect that you are describing. The following code succeeds on master:

import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq

df = pd.DataFrame({'a': ['str']})
df['a'] = df['a'].astype('category')
pq.write_metadata(pa.Table.from_pandas(df).schema, '_common_metadata')
t = pq.read_table('_common_metadata')
t.to_pandas(categories=['a'])

@asfimport
Copy link
Author

Uwe Korn / @xhochy:
Fixed in master, segfaulting in 0.9, closing

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

No branches or pull requests

2 participants