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

REF: collect attribute-setting at the end of create_axes #30029

Merged
merged 4 commits into from
Dec 4, 2019

Conversation

jbrockmendel
Copy link
Member

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

Copy link
Member

@WillAyd WillAyd left a 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

@@ -3785,15 +3785,13 @@ def create_axes(
)

# create according to the new data
self.non_index_axes = []
self.data_columns = []
nia: List = []
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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.

@@ -3785,15 +3785,13 @@ def create_axes(
)

# create according to the new data
self.non_index_axes = []
self.data_columns = []
nia: List = []
Copy link
Member

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?

self.non_index_axes = []
self.data_columns = []
nia: List = []
dcs = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@simonjayhawkins simonjayhawkins added IO HDF5 read_hdf, HDFStore Refactor Internal refactoring of code labels Dec 4, 2019
@jbrockmendel
Copy link
Member Author

changed to more descriptive names, added annotation for new_data_columns, non_index_axes i kept as Listbecause I think we can do a better job of being consistent about what we're passing, want to wait to annotate until then

@jreback jreback added this to the 1.0 milestone Dec 4, 2019
@jreback jreback merged commit 1209d7b into pandas-dev:master Dec 4, 2019
@jreback
Copy link
Contributor

jreback commented Dec 4, 2019

sure

@jbrockmendel jbrockmendel deleted the cln-pytables-create_axes branch December 4, 2019 19:32
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HDF5 read_hdf, HDFStore Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants