-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
REF: collect attribute-setting at the end of create_axes #30029
REF: collect attribute-setting at the end of create_axes #30029
Conversation
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.
Sure on board with this
pandas/io/pytables.py
Outdated
@@ -3785,15 +3785,13 @@ def create_axes( | |||
) | |||
|
|||
# create according to the new data | |||
self.non_index_axes = [] | |||
self.data_columns = [] | |||
nia: List = [] |
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.
Any chance of adding a subtype here?
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.
why the rename? I would imagine non_index_axes
newcomer friendly than a TLA.
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.
why the rename? I would imagine non_index_axes newcomer friendly than a TLA.
i wanted something not-identical to the self.foo name for grepping purposes, but can try to find a middle ground that is more descriptive
Any chance of adding a subtype here?
I'll give it the ol' college try.
pandas/io/pytables.py
Outdated
@@ -3785,15 +3785,13 @@ def create_axes( | |||
) | |||
|
|||
# create according to the new data | |||
self.non_index_axes = [] | |||
self.data_columns = [] | |||
nia: List = [] |
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.
Any chance of adding a subtype here?
pandas/io/pytables.py
Outdated
self.non_index_axes = [] | ||
self.data_columns = [] | ||
nia: List = [] | ||
dcs = [] |
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.
same
…n-pytables-create_axes
changed to more descriptive names, added annotation for new_data_columns, non_index_axes i kept as |
sure |
Ideally we wouldn't be altering
self
inplace at all, but we can make this a lot easier to reason about by collecting all of the attribute-setting at the end of the create_axes call.self.non_index_axes
I couldn't get all the way to the end of the call without a more invasive edit, which ill save for a separate pass to keep the diff smallish