-
Notifications
You must be signed in to change notification settings - Fork 915
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
Preserve column metadata during more DataFrame operations #15519
Preserve column metadata during more DataFrame operations #15519
Conversation
|
||
return self._mimic_inplace( | ||
self._from_data_like_self(out), inplace=inplace | ||
self._from_data_like_self(self._data._from_columns_like_self(out)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see a number of instances of _from_data_like_self
. Can we use _from_data
instead consistently now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use _from_data instead consistently now?
Getting there but not quite yet due to preserving the index
. IndexedFrame._from_data_like_self
is like _from_data
but preserves the existing index which IndexedFrame._from_data
doesn't do by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor docstring nit, thanks for the continued refactoring and cleanups!
/merge |
Description
Supersedes #15410, adds a
ColumnAccessor._from_columns_like_self
that will preserve column attributes during DataFrame operations. This can wholly replace_from_data_like_self
Checklist