Skip to content

Error "buffer source array is read-only" when using unique() on df loaded with feather #23276

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

Closed
eamag opened this issue Oct 22, 2018 · 3 comments
Labels
Needs Info Clarification about behavior needed to assess issue

Comments

@eamag
Copy link

eamag commented Oct 22, 2018

Code Sample, a copy-pastable example if possible

import pandas as pd
import feather

df1 = pd.DataFrame([1,2,3,1,2,4], columns=['a'])
df1.a = df1.a.astype('category')
print(df1.a.unique())

df1.to_feather('a.feather')
df1 = feather.read_dataframe('a.feather')
df1.a.unique()
@TomAugspurger TomAugspurger added the Needs Info Clarification about behavior needed to assess issue label Oct 22, 2018
@TomAugspurger
Copy link
Contributor

What version of pandas? This works for me on master (thats' why we ask you to fill out the issue template).

@xhochy
Copy link
Contributor

xhochy commented Oct 22, 2018

This is fixed by #21688 which is not in a released version yet.

@TomAugspurger
Copy link
Contributor

Great, thanks @xhochy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Info Clarification about behavior needed to assess issue
Projects
None yet
Development

No branches or pull requests

3 participants