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

Make specific pandas dataframe column immuteable / not changeable #58772

Closed
1 of 3 tasks
weidinger-c opened this issue May 18, 2024 · 4 comments
Closed
1 of 3 tasks

Make specific pandas dataframe column immuteable / not changeable #58772

weidinger-c opened this issue May 18, 2024 · 4 comments
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Needs Discussion Requires discussion from core team before further action

Comments

@weidinger-c
Copy link

weidinger-c commented May 18, 2024

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I would be really helpful if specific columns cannot be altered.

Feature Description

I have a lib that returns a pd.dataframe but only a few columns are allowed to be altered. Just dropping the not allowed columns does not solve the problem, because they are needed at a later point.

Alternative Solutions

e.g.
df = pd.Dataframe(...)
df.make_column_immutable("column_name")

Additional Context

No response

@weidinger-c weidinger-c added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels May 18, 2024
@rhshadrach rhshadrach added Needs Discussion Requires discussion from core team before further action Closing Candidate May be closeable, needs more eyeballs and removed Needs Triage Issue that has not been reviewed by a pandas team member labels May 19, 2024
@rhshadrach
Copy link
Member

Thanks for the request. I don't think this feature meets the bar of being a common enough need to be implemented within pandas.

@weidinger-c
Copy link
Author

Sad to hear.

@mroeschke
Copy link
Member

Agreed with this being out of scope in pandas. As a work around you could use the static-frame package to segment the columns that need to be immutable: https://github.com/static-frame/static-frame.

Thanks for the request but closing

@weidinger-c
Copy link
Author

Agreed with this being out of scope in pandas. As a work around you could use the static-frame package to segment the columns that need to be immutable: https://github.com/static-frame/static-frame.

Thanks for the request but closing

Thanks, willl have a look at that package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

3 participants