From 70e50f344113532de28fe0e1f14b32b49c3572dd Mon Sep 17 00:00:00 2001 From: Terji Petersen Date: Sun, 2 Apr 2023 19:58:16 +0100 Subject: [PATCH] fix slow tests --- doc/source/whatsnew/v2.1.0.rst | 4 ++-- pandas/tests/io/test_html.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/whatsnew/v2.1.0.rst b/doc/source/whatsnew/v2.1.0.rst index 38f02b71bab36b..5e92eea80649c5 100644 --- a/doc/source/whatsnew/v2.1.0.rst +++ b/doc/source/whatsnew/v2.1.0.rst @@ -25,7 +25,7 @@ enhancement1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When given a callable, :meth:`Series.map` applies the callable to all elements of the :class:`Series`. -Similarly, :meth:`DataFrame.map` (:meth:`DataFrame.applymap`) applies the callable to all elements of the :class:`DataFrame`, +Similarly, :meth:`DataFrame.map` (previously named :meth:`DataFrame.applymap`) applies the callable to all elements of the :class:`DataFrame`, while :meth:`Index.map` applies the callable to all elements of the :class:`Index`. Frequently, it is not desirable to apply the callable to nan-like values of the array and to avoid doing @@ -67,7 +67,7 @@ Also, note that :meth:`Categorical.map` implicitly has had its ``na_action`` set This has been deprecated and will :meth:`Categorical.map` in the future change the default to ``na_action=None``, like for all the other array types. -Notice also that :meth:`DataFrame.applymap` has been renamed to :meth:`DataFrame.map` (:issue:`52353`). +Notice also that in this version, :meth:`DataFrame.applymap` has been renamed to :meth:`DataFrame.map` (:issue:`52353`). .. _whatsnew_210.enhancements.other: diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 4398637237b429..4bd4e0cd7146f6 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -682,8 +682,8 @@ def try_remove_ws(x): "Hamilton Bank, NA", "The Citizens Savings Bank", ] - dfnew = df.applymap(try_remove_ws).replace(old, new) - gtnew = ground_truth.applymap(try_remove_ws) + dfnew = df.map(try_remove_ws).replace(old, new) + gtnew = ground_truth.map(try_remove_ws) converted = dfnew date_cols = ["Closing Date", "Updated Date"] converted[date_cols] = converted[date_cols].apply(to_datetime)