From 945584f4263afedcb726eaabaf554a6ddd960a0c Mon Sep 17 00:00:00 2001 From: Arceris Date: Mon, 29 Jan 2024 11:24:47 -0700 Subject: [PATCH] Update string_grouper.py for pandas Pandas has deprecated applymap. Changing to map is the indicated change, and works without any additional changes. FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. --- string_grouper/string_grouper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string_grouper/string_grouper.py b/string_grouper/string_grouper.py index 0d8a5ac6..69b7a87c 100644 --- a/string_grouper/string_grouper.py +++ b/string_grouper/string_grouper.py @@ -1147,7 +1147,7 @@ def _validate_strings_exist(master_side, dupe_side, master_strings, dupe_strings def _is_series_of_strings(series_to_test: pd.Series) -> bool: if not isinstance(series_to_test, pd.Series): return False - elif series_to_test.to_frame().applymap( + elif series_to_test.to_frame().map( lambda x: not isinstance(x, str) ).squeeze(axis=1).any(): return False