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

whatsnew 1.3.0 #41747

Merged
merged 13 commits into from
Jun 9, 2021
Merged

whatsnew 1.3.0 #41747

merged 13 commits into from
Jun 9, 2021

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented May 31, 2021

  • Ensure all linting tests pass, see here for how to run them

Minor fixups. After I get feedback here, I plan to make a PR with detailed instructions about adding to the whatsnew.

cc @attack68 - the Styler sections had a major revisions, wanted to get any feedback here.

cc @jorisvandenbossche @simonjayhawkins


:class:`.Styler` has also been compatible with non-unique index or columns, at least for as many features as are fully compatible, others made only partially compatible (:issue:`41269`).
One also has greater control of the display through separate sparsification of the index or columns, using the new 'styler' options context (:issue:`41142`).
Many features of the :class:`.Styler` class are now either partially or fully usable on a DataFrame with a non-unique indexes or columns (:issue:`41269`).
Copy link
Contributor

Choose a reason for hiding this comment

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

can use bullet points to improve readability

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed - while reworking this as bullet points I noticed that much is a duplicate of other lines in the whatsnew. We should either have a single section in Enhancements or single lines in the Other Enhancements (which will be broken into sections, and hence include a Styler section) and Bugfixes.

I lean toward breaking it up (since they aren't all enhancements) into the appropriate sections. cc @attack68 for thoughts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Marking this PR as a draft until this is resolved so it won't be merged.

- Add support for dict-like names in :meth:`Index.set_names` and :meth:`.Index.rename` in the case of a :class:`MultiIndex` (:issue:`20421`)
- :func:`read_excel` can now auto-detect .xlsb files and older .xls files (:issue:`35416`, :issue:`41225`)
- :class:`ExcelWriter` now accepts an ``if_sheet_exists`` parameter to control the behaviour of append mode when writing to existing sheets (:issue:`40230`)
- :meth:`.Rolling.sum`, :meth:`.Expanding.sum`, :meth:`.Rolling.mean`, :meth:`.Expanding.mean`, :meth:`.ExponentialMovingWindow.mean`, :meth:`.Rolling.median`, :meth:`.Expanding.median`, :meth:`.Rolling.max`, :meth:`.Expanding.max`, :meth:`.Rolling.min`, and :meth:`.Expanding.min` now support `Numba <http://numba.pydata.org/>`_ execution with the ``engine`` keyword (:issue:`38895`, :issue:`41267`)
Copy link
Contributor

Choose a reason for hiding this comment

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

might be worth it to:

  • group the other enhancements by category / type (groupby / rolling / styler etc). and create-sub headers

- Bug in :meth:`DataFrame.loc.__setitem__` when setting-with-expansion incorrectly raising when the index in the expanding axis contains duplicates (:issue:`40096`)
- Bug in :meth:`DataFrame.loc.__getitem__` with :class:`MultiIndex` casting to float when at least one column is from has float dtype and we retrieve a scalar (:issue:`41369`)
- Bug in :meth:`DataFrame.loc` incorrectly matching non-boolean index elements (:issue:`20432`)
- Bug in :meth:`DataFrame.loc` not raising ``KeyError`` when the key was not found in :class:`MultiIndex` and the levels were not fully specified (:issue:`41170`)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have a MultiIndex section? if so can you move relevant notes

Copy link
Member

Choose a reason for hiding this comment

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

i think this belongs here in the Indexing section, since the user-facing bug is in .loc

- Bug in :func:`read_sas` raising ``ValueError`` when ``datetimes`` were null (:issue:`39725`)
- Bug in :func:`read_csv` raising a ``TypeError`` when ``names`` and ``parse_dates`` is specified for ``engine="c"`` (:issue:`33699`)
- Bug in :func:`read_clipboard` and :func:`DataFrame.to_clipboard` not working in WSL (:issue:`38527`)
- Allow custom error values for the ``parse_dates`` argument of :func:`read_sql`, :func:`read_sql_query` and :func:`read_sql_table` (:issue:`35185`)
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally can group notes e.g. for read_csv, read_excel etc. sub-sections prob not needed)



Other
^^^^^
- Bug in :class:`Index` constructor sometimes silently ignoring a specified ``dtype`` (:issue:`38879`)
- Bug in :func:`pandas.api.types.infer_dtype` not recognizing Series, Index or array with a period dtype (:issue:`23553`)
- Bug in :func:`pandas.api.types.infer_dtype` raising an error for general :class:`.ExtensionArray` objects. It will now return ``"unknown-array"`` instead of raising (:issue:`37367`)
- Bug in :func:`.infer_dtype` not recognizing Series, Index, or array with a Period dtype (:issue:`23553`)
Copy link
Contributor

Choose a reason for hiding this comment

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

any of these that can be in other more specific sections would be good.

@rhshadrach rhshadrach marked this pull request as draft June 1, 2021 03:32
@rhshadrach
Copy link
Member Author

@jreback - agreed with all your suggestions above but would like to hold off and do in a followup to keep the diff here reasonable. I think it's okay for the changes to happen during the RC period (but won't be waiting for the RC period either)

@rhshadrach
Copy link
Member Author

@attack68 - The performance improvement of the HTML rendering referenced #37792 but this is unrelated, not sure what issue/PR was meant. Also from the line

  • The method :meth:.Styler.format has been improved to easily format missing data, precision, and perform HTML escaping (:issue:40437, :issue:40134)

I think the "format missing data" is referring to #40134, but I can't find changes to na_rep there. Can you help me understand what changed?

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

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

lgtm.

after many commits it became a bit messy. the bullet point format seems better. Also there were some Styler additions in relevant sections below this one, so some things might have been duplicated, but maybe thats ok for readers?

@attack68
Copy link
Contributor

attack68 commented Jun 1, 2021

@attack68 - The performance improvement of the HTML rendering referenced #37792 but this is unrelated, not sure what issue/PR was meant. Also from the line

  • The method :meth:.Styler.format has been improved to easily format missing data, precision, and perform HTML escaping (:issue:40437, :issue:40134)

I think the "format missing data" is referring to #40134, but I can't find changes to na_rep there. Can you help me understand what changed?

there was a function called Styler.set_na_rep(), which set a property on self and the format method with an na_rep arg which conflicted at times. So, yes, it was there previously but it didn't always do what you thought. Now the missing data in Styler is handled exclusively and consistently by Styler.format, and Styler.set_na_rep is deprecated.

@attack68
Copy link
Contributor

attack68 commented Jun 1, 2021

@attack68 - The performance improvement of the HTML rendering referenced #37792 but this is unrelated, not sure what issue/PR was meant. Also from the line

#39972 and #39952

@@ -693,10 +686,10 @@ Deprecations
- Deprecated passing arguments as positional in :meth:`DataFrame.set_index` (other than ``"keys"``) (:issue:`41485`)
- Deprecated passing arguments as positional (except for ``"levels"``) in :meth:`MultiIndex.set_levels` (:issue:`41485`)
- Deprecated passing arguments as positional in :meth:`DataFrame.sort_index` and :meth:`Series.sort_index` (:issue:`41485`)
- Deprecated passing arguments as positional in :meth:`DataFrame.drop_duplicates` (except for ``subset``), :meth:`Series.drop_duplicates`, :meth:`Index.drop_duplicates` and :meth:`MultiIndex.drop_duplicates`(:issue:`41485`)
- Deprecated passing arguments as positional in :meth:`DataFrame.drop_duplicates` (except for ``subset``), :meth:`Series.drop_duplicates`, :meth:`Index.drop_duplicates` and :meth:`MultiIndex.drop_duplicates` (:issue:`41485`)
Copy link
Member

Choose a reason for hiding this comment

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

Not necessarily for this PR, but there are enough deprecations i think it might be worth subsections for e.g. positional arguments (or at least collect them all together)

Copy link
Member

Choose a reason for hiding this comment

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

@MarcoGorelli is planning to tidy that up. #41485 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

yup - those deprecations are all done now so I'll do this week

@jbrockmendel
Copy link
Member

@rhshadrach there's a lot here. id suggest breaking off the non-controversial bits into a precursor PR

@simonjayhawkins
Copy link
Member

simonjayhawkins commented Jun 1, 2021

@rhshadrach there's a lot here. id suggest breaking off the non-controversial bits into a precursor PR

maybe start with the sphinx directive syntax errors, then another PR for the sphinx directives with broken links, then the grammer and then finally move stuff.

@jreback jreback added this to the 1.3 milestone Jun 1, 2021
@simonjayhawkins
Copy link
Member

The first one (maybe 2) would be good for the rc

@rhshadrach
Copy link
Member Author

Going back on what I said in #41747 (comment), I only plan to finish up this what's in this PR. I'll break it up as @simonjayhawkins recommended.

@jbrockmendel
Copy link
Member

@rhshadrach is more of this getting broken off or can you mark as Ready For Review?

…atsnew1.3

� Conflicts:
�	doc/source/whatsnew/v1.3.0.rst
@rhshadrach rhshadrach mentioned this pull request Jun 5, 2021
1 task
@rhshadrach
Copy link
Member Author

@jbrockmendel - one last one (#41822).

The main reason for draft status is #41747 (comment). Currently the top section of styler duplicates many of the other notes in the whatsnew. Need to deduplicate and decide whether enhancements for the Styler should appear in the top enhancement section or as line items in the Other Enhancements (grouped together). Any thoughts here would be appreciated.

I think it is clear that bugfixes should go in the Styler bugfixes section and not in the top enhancement section.

@rhshadrach
Copy link
Member Author

rhshadrach commented Jun 5, 2021

I've deduplicated the Styler notes and reorganized so that all enhancements are in Enhancements in their own section, while Performance, Deprecation, and Bugfix notes appear below in the appropriate sections.

@rhshadrach rhshadrach marked this pull request as ready for review June 7, 2021 20:41
@rhshadrach
Copy link
Member Author

I can siphon off the Styler relevant pieces into a separate PR as well if that will make this easier to review. Let me know if that's desirable @simonjayhawkins, @jbrockmendel (or anyone else)

- Added the method :meth:`.Styler.highlight_between` (:issue:`39821`)
- Added the method :meth:`.Styler.highlight_quantile` (:issue:`40926`)
- Added the method :meth:`.Styler.text_gradient` (:issue:`41098`)
- Added the method :meth:`.Styler.set_tooltips` allowing hover tooltips; this can be used enhance interactive displays (:issue:`21266`)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is duplicated with line 123

Copy link
Contributor

@attack68 attack68 left a comment

Choose a reason for hiding this comment

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

see a few inline comments

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

I would say merge this now. and can do another pass to address any outstanding comments, but web and docs ci is failing. can you fix that up.

@simonjayhawkins
Copy link
Member

@rhshadrach merge conflicts

@rhshadrach
Copy link
Member Author

Thanks @attack68 and @simonjayhawkins for the comments/requests, adjustments made and conflicts resolved.

@simonjayhawkins simonjayhawkins merged commit cecc3a1 into pandas-dev:master Jun 9, 2021
@simonjayhawkins
Copy link
Member

Thanks @rhshadrach I think just @jreback comments about moving stuff to do in follow-up.

@rhshadrach rhshadrach deleted the whatsnew1.3 branch June 9, 2021 15:50
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants