From 74ea49bd50c62253bcbd56f662b7d0cd9c5621f9 Mon Sep 17 00:00:00 2001 From: Lou Kratz Date: Wed, 21 Feb 2024 09:14:18 -0500 Subject: [PATCH] (update) Use map instead of applymap as it's deprecated --- hashable_df/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hashable_df/__init__.py b/hashable_df/__init__.py index 68f5df6..5953ab9 100644 --- a/hashable_df/__init__.py +++ b/hashable_df/__init__.py @@ -13,9 +13,9 @@ def f(value): def hashable_df(df): """Return a DataFrame with hashable cell values.""" - # applymap might change types. Try to restore the original. + # map might change types. Try to restore the original. orig_types = df.dtypes - df = df.applymap(f).astype(orig_types, errors="ignore") + df = df.map(f).astype(orig_types, errors="ignore") return df