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

DEPR: Deprecate tupleize_cols in Index constructor #17899

Closed

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Oct 17, 2017

Title is self-explanatory.

xref #17060.

@gfyoung gfyoung added Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves labels Oct 17, 2017
@gfyoung gfyoung added this to the 0.21.0 milestone Oct 17, 2017
"will be removed in a future version",
FutureWarning, stacklevel=2)
else:
tupleize_cols = True
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you changing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because you said that we should deprecate this parameter back in #17060. If that's no longer the case, I can just close this.

@codecov
Copy link

codecov bot commented Oct 17, 2017

Codecov Report

Merging #17899 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17899      +/-   ##
==========================================
- Coverage   91.23%   91.22%   -0.02%     
==========================================
  Files         163      163              
  Lines       50105    50111       +6     
==========================================
- Hits        45715    45712       -3     
- Misses       4390     4399       +9
Flag Coverage Δ
#multiple 89.03% <100%> (ø) ⬆️
#single 40.32% <85.71%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/dtypes/dtypes.py 95.14% <100%> (ø) ⬆️
pandas/core/indexes/base.py 96.43% <100%> (+0.01%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bf7f9a...613499c. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 17, 2017

Codecov Report

Merging #17899 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17899      +/-   ##
==========================================
- Coverage   91.23%   91.22%   -0.02%     
==========================================
  Files         163      163              
  Lines       50105    50111       +6     
==========================================
- Hits        45715    45712       -3     
- Misses       4390     4399       +9
Flag Coverage Δ
#multiple 89.03% <100%> (ø) ⬆️
#single 40.32% <85.71%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/base.py 96.43% <100%> (+0.01%) ⬆️
pandas/core/dtypes/dtypes.py 95.14% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bf7f9a...613499c. Read the comment docs.

@jorisvandenbossche
Copy link
Member

I don't think we can deprecate this. When we implement the "dtype=objcet disables all inference" (and thus preserves the tuples as tuples instead of returning MultiIndex) (#17246), we have an alternative way to do this, and we might consider deprecating tupleize_cols. But #17246 hasn't been solved yet.

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Oct 17, 2017

This is also what Tom mentioned in #17060 (comment)

Including the Index constructor one (just to confirm)?

I think so, with the idea the Index([('a', 1)]) -> MultiIndex, while Index([('a', 1)], dtype=object) returns a regular Index with tuples for values. xref #17246

The main thing that would not be possible with dtype=object is to "infer the dtype, but never return MI (so don't infer tuples to MI)", which is possible now with tupleize_cols=False

@gfyoung
Copy link
Member Author

gfyoung commented Oct 17, 2017

Ah, right...thanks for reminding me about that. I guess the deprecation does seem premature in light of the ongoing discussion in #17246.

I'll close the PR but can always revisit once it gets resolved.

@gfyoung gfyoung closed this Oct 17, 2017
@gfyoung gfyoung modified the milestones: 0.21.0, No action Oct 17, 2017
@jorisvandenbossche
Copy link
Member

the ongoing discussion in #17246.

I think we agree on the idea, it just needs somebody doing the work.

@gfyoung gfyoung deleted the depr-index-tupleize-cols branch October 17, 2017 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants