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

ENH: Support attrs in feather files #60675

Open
1 of 3 tasks
phemmer opened this issue Jan 8, 2025 · 0 comments
Open
1 of 3 tasks

ENH: Support attrs in feather files #60675

phemmer opened this issue Jan 8, 2025 · 0 comments
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@phemmer
Copy link

phemmer commented Jan 8, 2025

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

Issue #54321 added support for attrs in parquet files. This is a request to do the same thing for feather files.

Feature Description

Add support for DataFrame.attrs in to_feather() and read_feather().

Alternative Solutions

I'm unsure if this lack of implementation is due to just nobody having done it, or if the arrow format doesn't support it. If it's not supported, I might suggest adding a note to the to_feather documentation, similar to like is already done for the lack of support for custom indexes.

Additional Context

import pandas as pd

df = pd.DataFrame([{"foo":1}])
df.attrs['foo'] = 'bar'

df.to_feather("/tmp/foo.feather")
print(pd.read_feather("/tmp/foo.feather").attrs)

Should output:

{'foo': 'bar'}

@phemmer phemmer added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant