Skip to content

BUG: #19497 FIX. Add tupleize_cols option to internals._transform_index() #20526

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

Closed
wants to merge 3 commits into from

Conversation

charlie0389
Copy link
Contributor

  • Closes Bug: rename incapable of accepting tuples as new name #19497
  • NO TESTS have been added/passed. Currently experiencing issues getting pandas conda environment installed so unable to do this myself. Very simple alteration however...
  • Code passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • Implements tupleize_cols option for pandas.core.internals_transform_index(), and provides the capability to manipulate this option using pandas.DataFrame.rename().
    NOTE: for renaming, the keyword argument default is False, because as suggested here, this is unintuitive and unexepected. The keyword argument for the _transform_index() is True however, which is consistent with default pandas.Index() creation behaviour.

@codecov
Copy link

codecov bot commented Mar 29, 2018

Codecov Report

Merging #20526 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20526      +/-   ##
==========================================
- Coverage   91.84%   91.83%   -0.01%     
==========================================
  Files         152      152              
  Lines       49259    49260       +1     
==========================================
- Hits        45241    45240       -1     
- Misses       4018     4020       +2
Flag Coverage Δ
#multiple 90.22% <100%> (-0.01%) ⬇️
#single 41.89% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/frame.py 97.18% <ø> (ø) ⬆️
pandas/core/internals.py 95.53% <100%> (ø) ⬆️
pandas/core/generic.py 95.85% <100%> (ø) ⬆️
pandas/util/testing.py 84.52% <0%> (-0.21%) ⬇️

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 0c4e611...f79b82d. Read the comment docs.

@charlie0389
Copy link
Contributor Author

charlie0389 commented Mar 30, 2018 via email

@jreback
Copy link
Contributor

jreback commented Mar 30, 2018

this PR is not likely to be accepted, esp as there are no tests. We are not going to be adding a specific argument to .rename to special handle a very non-idiomatic special case here. If you want to propose something, do so on the original issue.

@jreback jreback closed this Mar 30, 2018
@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Mar 30, 2018
@charlie0389 charlie0389 deleted the BUG#19497 branch May 14, 2018 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants