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

ENH: sparse_columns and sparse_index added to Styler.to_html #41946

Merged
merged 21 commits into from Jul 28, 2021

Conversation

@attack68
Copy link
Contributor

@attack68 attack68 commented Jun 11, 2021

Checks an item off the list in #41693

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 11, 2021

@attack68 does this need a release note?

you can keep adding to the 1.3 release notes. is Styler still experimental? I think we can merge these changes to 1.3 during the rc (if not done before)

@attack68
Copy link
Contributor Author

@attack68 attack68 commented Jun 11, 2021

@attack68 does this need a release note?

you can keep adding to the 1.3 release notes. is Styler still experimental? I think we can merge these changes to 1.3 during the rc (if not done before)

No release note needed, since these args could have been added in the previous PR that added the method to 1.3.0.

I think Styler is fully functional now, it has extensive docs, improved performance and features, high test coverage, and very close to being able to deprecate DataFrame.to_html and DataFrame.to_latex. Its also been around a number of years now so I would say well integrated into the package.

No reason this can't get into 1.3 as long as it fits your timeline.

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 12, 2021

No reason this can't get into 1.3 as long as it fits your timeline.

i think OK for 1.3

@simonjayhawkins simonjayhawkins added this to the 1.3 milestone Jun 12, 2021
@jreback jreback removed this from the 1.3 milestone Jun 12, 2021
@jreback
Copy link
Contributor

@jreback jreback commented Jun 12, 2021

don't add milestones

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 12, 2021

don't add milestones

sure. if not 1.3 will need a release note. IIUC This sits on top an enhancement for 1.3.

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 12, 2021

and versionadded tags for the new parameters

@attack68
Copy link
Contributor Author

@attack68 attack68 commented Jun 15, 2021

@simonjayhawkins has this missed the boat for 1.3.0?

I can change to 1.4.0 if so.

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins commented Jun 15, 2021

@simonjayhawkins has this missed the boat for 1.3.0?

not necessarily if additions to enhancements added in 1.3. The to_html of Styler is new for 1.3? I've not really followed the changes. Do we still have a .render method and does it share code?

@attack68
Copy link
Contributor Author

@attack68 attack68 commented Jun 15, 2021

@simonjayhawkins has this missed the boat for 1.3.0?

not necessarily if additions to enhancements added in 1.3. The to_html of Styler is new for 1.3? I've not really followed the changes.

yes this is additions to a 1.3.0 enhancement. The only reason it wasn't added previously was to reduce the size of that other PR and for this to be a simple follow on.

Do we still have a .render method and does it share code?

Yes there is still a .render method currently but I will look to propose its deprecation for 1.4.0 since it becomes redundant. Its a reasonable amount of work to migrate the tests though thats why I didnt have time for 1.3.0.

…arse_args

# Conflicts:
#	pandas/tests/io/formats/style/test_html.py
@attack68 attack68 added Apply and removed Apply labels Jun 29, 2021
@attack68
Copy link
Contributor Author

@attack68 attack68 commented Jul 5, 2021

This seemed to miss 1.3.0 so I have added the necessary tags and comments for 1.4.0 insted.

@attack68 attack68 requested a review from jreback Jul 20, 2021
@attack68 attack68 added this to the 1.4.0 milestone Jul 27, 2021
@attack68 attack68 removed this from the 1.4.0 milestone Jul 27, 2021
@attack68 attack68 added this to the 1.4 milestone Jul 27, 2021
Copy link
Contributor

@jreback jreback left a comment

lgtm merge on green

@jreback jreback merged commit 91872e7 into pandas-dev:master Jul 28, 2021
23 of 25 checks passed
@jreback
Copy link
Contributor

@jreback jreback commented Jul 28, 2021

thanks @attack68

CGe0516 added a commit to CGe0516/pandas that referenced this issue Jul 29, 2021
@attack68 attack68 deleted the styler_to_html_sparse_args branch Jul 29, 2021
Leonardofreua added a commit to Leonardofreua/pandas that referenced this issue Jul 30, 2021
attack68 added a commit that referenced this issue Jul 31, 2021
* TST: Fix doctests for pandas.io.formats.style

* Modified: pandas/io/formats/style.py

* Added some expected results

* Skipped some tests

* TST: Add link to redirect to Table Visualization user guide

* Modified style.py

* Updated the doctest of the apply()

* Updated the doctest of the applymap()

* Updated the doctest of the set_table_styles()

* Updated the doctest of the set_properties()

* TST: Add image to pipe function result

* Modified style.py

* Updated the doctest of the pipe()

* TST: Remove unnecessary outputs

* Modified pandas/io/formats/style.py

* Updated the doctests of the set_tooltips()

* Updated the doctests of the to_latex()

* Updated the doctests of the set_td_classes()

* Updated the doctests of the set_table_attributes()

* TST: Add the output to the Styler.format doctest in to_latex()

* REG: DataFrame.agg where func returns lists and axis=1 (#42762)

* Fix typing issues for CI (#42770)

* BUG: groupby.shift returns different columns when fill_value is specified (#41858)

* PERF: extract_array earlier in DataFrame construction (#42774)

* ENH: `sparse_columns` and `sparse_index` added to `Styler.to_html`  (#41946)

* TYP: Fix typing for searchsorted (#42788)

* DOC GH42756 Update documentation for pandas.DataFrame.drop to clarify tuples. (#42789)

* CI: Fix doctests (#42790)

* REGR: nanosecond timestamp comparisons to OOB datetimes (#42796)

* COMPAT: MPL 3.4.0 (#42803)

* Delete duplicates and unused code from reshape tests (#42802)

* REGR: ValueError raised when both prefix and names are set to None (#42690)

* REGR: ValueError raised when both prefix and names are set to None

* Update readers.py

* whitespace

* Update v1.3.1.rst

* Update v1.3.2.rst

* Update readers.py

* Update readers.py

Co-authored-by: Jeff Reback <jeff@reback.net>

* TST: Add style.py to the doctest check

* TST: fixed eng_formatter doctest for #42671 (#42705)

* TST: Revert x and y position in some doctests

* Updated the doctest of the hide_columns()

Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
Co-authored-by: Irv Lustig <irv@princeton.com>
Co-authored-by: Thomas Smith <thomassmith0304@gmail.com>
Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
Co-authored-by: attack68 <24256554+attack68@users.noreply.github.com>
Co-authored-by: Mike Phung <mikephung122@gmail.com>
Co-authored-by: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com>
Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
Co-authored-by: Jeff Reback <jeff@reback.net>
Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>
Joeperdefloep pushed a commit to Joeperdefloep/pandas that referenced this issue Sep 7, 2021
Joeperdefloep pushed a commit to Joeperdefloep/pandas that referenced this issue Sep 7, 2021
* TST: Fix doctests for pandas.io.formats.style

* Modified: pandas/io/formats/style.py

* Added some expected results

* Skipped some tests

* TST: Add link to redirect to Table Visualization user guide

* Modified style.py

* Updated the doctest of the apply()

* Updated the doctest of the applymap()

* Updated the doctest of the set_table_styles()

* Updated the doctest of the set_properties()

* TST: Add image to pipe function result

* Modified style.py

* Updated the doctest of the pipe()

* TST: Remove unnecessary outputs

* Modified pandas/io/formats/style.py

* Updated the doctests of the set_tooltips()

* Updated the doctests of the to_latex()

* Updated the doctests of the set_td_classes()

* Updated the doctests of the set_table_attributes()

* TST: Add the output to the Styler.format doctest in to_latex()

* REG: DataFrame.agg where func returns lists and axis=1 (pandas-dev#42762)

* Fix typing issues for CI (pandas-dev#42770)

* BUG: groupby.shift returns different columns when fill_value is specified (pandas-dev#41858)

* PERF: extract_array earlier in DataFrame construction (pandas-dev#42774)

* ENH: `sparse_columns` and `sparse_index` added to `Styler.to_html`  (pandas-dev#41946)

* TYP: Fix typing for searchsorted (pandas-dev#42788)

* DOC GH42756 Update documentation for pandas.DataFrame.drop to clarify tuples. (pandas-dev#42789)

* CI: Fix doctests (pandas-dev#42790)

* REGR: nanosecond timestamp comparisons to OOB datetimes (pandas-dev#42796)

* COMPAT: MPL 3.4.0 (pandas-dev#42803)

* Delete duplicates and unused code from reshape tests (pandas-dev#42802)

* REGR: ValueError raised when both prefix and names are set to None (pandas-dev#42690)

* REGR: ValueError raised when both prefix and names are set to None

* Update readers.py

* whitespace

* Update v1.3.1.rst

* Update v1.3.2.rst

* Update readers.py

* Update readers.py

Co-authored-by: Jeff Reback <jeff@reback.net>

* TST: Add style.py to the doctest check

* TST: fixed eng_formatter doctest for pandas-dev#42671 (pandas-dev#42705)

* TST: Revert x and y position in some doctests

* Updated the doctest of the hide_columns()

Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
Co-authored-by: Irv Lustig <irv@princeton.com>
Co-authored-by: Thomas Smith <thomassmith0304@gmail.com>
Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
Co-authored-by: attack68 <24256554+attack68@users.noreply.github.com>
Co-authored-by: Mike Phung <mikephung122@gmail.com>
Co-authored-by: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com>
Co-authored-by: Patrick Hoefler <61934744+phofl@users.noreply.github.com>
Co-authored-by: Jeff Reback <jeff@reback.net>
Co-authored-by: Krishna Chivukula <63070026+KrishnaSai2020@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants