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

DOC/API: Move Styler import #16059

Merged
merged 2 commits into from
Apr 21, 2017

Conversation

TomAugspurger
Copy link
Contributor

@TomAugspurger TomAugspurger commented Apr 19, 2017

From the top-level to pandas.io.formats.style.Styler, which is a bit wordy
but I was having circular-import issues at pandas.io.formats.
I think that's ok since people won't really be using this interactively.

Closes #16009

From the top-level to pandas.io.formats.style.Styler, which is a bit wordy
but I was having circular-import issues at pandas.io.formats.
I think that's ok since people won't really be using this interactively.

Closes pandas-dev#16009
@jorisvandenbossche
Copy link
Member

api.rst also needs an update

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Apr 19, 2017

In this issue (#16009), I also raised the question whether we should deprecate the old location. But is there currently a reason that a user would use the actual object instead of access it through df.style ? (if not, the deprecation is probably not needed?)

@codecov
Copy link

codecov bot commented Apr 19, 2017

Codecov Report

Merging #16059 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16059      +/-   ##
==========================================
+ Coverage   90.79%   90.82%   +0.02%     
==========================================
  Files         156      155       -1     
  Lines       50534    50518      -16     
==========================================
- Hits        45883    45881       -2     
+ Misses       4651     4637      -14
Flag Coverage Δ
#multiple 88.59% <ø> (+0.02%) ⬆️
#single 40.45% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/api.py 100% <ø> (+28.57%) ⬆️

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 f114af0...5516aa4. Read the comment docs.

@TomAugspurger
Copy link
Contributor Author

I believe api.rst was already changed as part of the move.

Style
-----
.. currentmodule:: pandas.io.formats.style

``Styler`` objects are returned by :attr:`pandas.DataFrame.style`.

For the deprecation... I could go either way. 5516aa4 adds a compatibility shim pointing to the new location. I'll add it to the master list if we decide to include it.

@codecov
Copy link

codecov bot commented Apr 19, 2017

Codecov Report

Merging #16059 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16059      +/-   ##
==========================================
+ Coverage   90.79%   90.81%   +0.02%     
==========================================
  Files         156      156              
  Lines       50534    50521      -13     
==========================================
  Hits        45883    45883              
+ Misses       4651     4638      -13
Flag Coverage Δ
#multiple 88.58% <100%> (+0.02%) ⬆️
#single 40.45% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/api.py 100% <ø> (+28.57%) ⬆️
pandas/formats/style.py 100% <100%> (ø)
pandas/core/common.py 90.68% <0%> (-0.35%) ⬇️

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 f114af0...5516aa4. Read the comment docs.

@jorisvandenbossche
Copy link
Member

I believe api.rst was already changed as part of the move.

Ah yes, my bad! (I actually even said it myself #16009 (comment) :-))

@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented Apr 20, 2017

@jorisvandenbossche all good for you? Is everyone OK with a deprecation warning from pandas.formats.style, to be removed in 0.21?

@TomAugspurger TomAugspurger merged commit 2f9c854 into pandas-dev:master Apr 21, 2017
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
* DOC/API: Move Styler import

From the top-level to pandas.io.formats.style.Styler, which is a bit wordy
but I was having circular-import issues at pandas.io.formats.
I think that's ok since people won't really be using this interactively.

Closes pandas-dev#16009

* Added deprecation warning and shim
@TomAugspurger TomAugspurger deleted the styler-api-docs branch May 29, 2017 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants