Skip to content

Follow-up #15954: public API for Styler #16009

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
3 tasks
jorisvandenbossche opened this issue Apr 15, 2017 · 4 comments
Closed
3 tasks

Follow-up #15954: public API for Styler #16009

jorisvandenbossche opened this issue Apr 15, 2017 · 4 comments
Labels
Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@jorisvandenbossche
Copy link
Member

As a reminder that we need to address this for 0.20, follow-up for #15954

  • Decide on public API entry (the whatsnew in the PR mentions pandas.io.api.Styler, but it is in practice also added to top-level namespace (pandas.Styler), while the API docs still use it as pandas.formats.style.Styler)
  • Depending on decision above (which may also depend on API: pandas.api #13634), update docs
  • Would it be needed to keep back compat shim at pandas.formats.style.Styler to deprecate? (not sure if many people would already used this object directly instead of through df.style)
@jorisvandenbossche jorisvandenbossche added the Output-Formatting __repr__ of pandas objects, to_string label Apr 15, 2017
@jorisvandenbossche jorisvandenbossche added this to the 0.20.0 milestone Apr 15, 2017
@TomAugspurger
Copy link
Contributor

Oh I forgot we did import * from pandas.io

I think we'll just del it from the top-level namespace.

I can add a shim if needed. Will get to this today.

@jorisvandenbossche
Copy link
Member Author

I would also think about whether we would want to put this in either pandas.io directly or either in pandas.io.style/pandas.io.formatting/pandas.io.formats, instead of in pandas.io.api. This last one is not publicly used currently, but only to gather those that are exposed top-level, so it seems a bit inconsistent to then put it there.

@jreback
Copy link
Contributor

jreback commented Apr 15, 2017

I think ok to move pandas.formats -> pandas.io.formats. Once I do that can then move this around / fix api wherever you need. probably pandas.io.Styler is fine for subclassing

@jorisvandenbossche
Copy link
Member Author

This is now changed in the API docs to pandas.io.formats.style.Styler (other docs still needs updating)

But, this is maybe a bit too nested? For the other publics things in io, they are typically at the pandas.io.module level.
So shall we expose it as pandas.io.formats.Styler ?

(BTW, it is a bit longer but I actually found pandas.io.formatting better sounding)

TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue 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 pandas-dev#16009
TomAugspurger added a commit that referenced this issue Apr 21, 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 #16009

* Added deprecation warning and shim
pcluo pushed a commit to pcluo/pandas that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

3 participants