Skip to content

Commit 93587e3

Browse files
authored
Merge pull request #163 from pandas-dev/master
Sync Fork from Upstream Repo
2 parents 9d3a9bd + dc5a65c commit 93587e3

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

doc/source/whatsnew/v1.3.0.rst

+25
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,31 @@ both XPath 1.0 and XSLT 1.0 is available. (:issue:`27554`)
110110
111111
For more, see :ref:`io.xml` in the user guide on IO tools.
112112

113+
Styler Upgrades
114+
^^^^^^^^^^^^^^^
115+
116+
We provided some focused development on :class:`.Styler`, including altering methods
117+
to accept more universal CSS language for arguments, such as ``'color:red;'`` instead of
118+
``[('color', 'red')]`` (:issue:`39564`). This is also added to the built-in methods
119+
to allow custom CSS highlighting instead of default background coloring (:issue:`40242`).
120+
121+
The :meth:`.Styler.apply` now consistently allows functions with ``ndarray`` output to
122+
allow more flexible development of UDFs when ``axis`` is ``None`` ``0`` or ``1`` (:issue:`39393`).
123+
124+
:meth:`.Styler.set_tooltips` is a new method that allows adding on hover tooltips to
125+
enhance interactive displays (:issue:`35643`). :meth:`.Styler.set_td_classes`, which was recently
126+
introduced in v1.2.0 (:issue:`36159`) to allow adding specific CSS classes to data cells, has
127+
been made as performant as :meth:`.Styler.apply` and :meth:`.Styler.applymap` (:issue:`40453`),
128+
if not more performant in some cases. The overall performance of HTML
129+
render times has been considerably improved to
130+
match :meth:`DataFrame.to_html` (:issue:`39952` :issue:`37792` :issue:`40425`).
131+
132+
The :meth:`.Styler.format` has had upgrades to easily format missing data,
133+
precision, and perform HTML escaping (:issue:`40437` :issue:`40134`). There have been numerous other bug fixes to
134+
properly format HTML and eliminate some inconsistencies (:issue:`39942` :issue:`40356` :issue:`39807` :issue:`39889` :issue:`39627`)
135+
136+
Documentation has also seen major revisions in light of new features (:issue:`39720` :issue:`39317` :issue:`40493`)
137+
113138
.. _whatsnew_130.dataframe_honors_copy_with_dict:
114139

115140
DataFrame constructor honors ``copy=False`` with dict

pandas/tests/indexes/datetimes/test_misc.py

+1
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ def test_datetime_name_accessors(self, time_locale):
366366
for day, name, eng_name in zip(range(4, 11), expected_days, english_days):
367367
name = name.capitalize()
368368
assert dti.day_name(locale=time_locale)[day] == name
369+
assert dti.day_name(locale=None)[day] == eng_name
369370
ts = Timestamp(datetime(2016, 4, day))
370371
assert ts.day_name(locale=time_locale) == name
371372
dti = dti.append(DatetimeIndex([pd.NaT]))

pandas/tests/indexes/period/test_indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def test_where(self, klass):
589589
def test_where_other(self):
590590
i = period_range("20130101", periods=5, freq="D")
591591
for arr in [np.nan, NaT]:
592-
result = i.where(notna(i), other=np.nan)
592+
result = i.where(notna(i), other=arr)
593593
expected = i
594594
tm.assert_index_equal(result, expected)
595595

pandas/tests/series/accessors/test_dt_accessor.py

+1
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ def test_dt_accessor_datetime_name_accessors(self, time_locale):
443443
for day, name, eng_name in zip(range(4, 11), expected_days, english_days):
444444
name = name.capitalize()
445445
assert s.dt.day_name(locale=time_locale)[day] == name
446+
assert s.dt.day_name(locale=None)[day] == eng_name
446447
s = s.append(Series([pd.NaT]))
447448
assert np.isnan(s.dt.day_name(locale=time_locale).iloc[-1])
448449

0 commit comments

Comments
 (0)