From d65b2da538ee8cd5a66054731ab55a38380ac8e1 Mon Sep 17 00:00:00 2001 From: Mattijn van Hoek Date: Fri, 20 Oct 2023 09:31:44 +0200 Subject: [PATCH] Update numpy-tooltip-images.rst FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. --- doc/case_studies/numpy-tooltip-images.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/case_studies/numpy-tooltip-images.rst b/doc/case_studies/numpy-tooltip-images.rst index 786a4c8e8d..76940f4e76 100644 --- a/doc/case_studies/numpy-tooltip-images.rst +++ b/doc/case_studies/numpy-tooltip-images.rst @@ -40,7 +40,7 @@ in order to have a quantitative measurement to plot. 'group': rng.choice(['a', 'b', 'c'], size=n_rows) }) # Compute the area as the proportion of pixels above a threshold - df[['image1_area', 'image2_area']] = df[['image1', 'image2']].applymap(lambda x: (x > 0.4).mean()) + df[['image1_area', 'image2_area']] = df[['image1', 'image2']].map(lambda x: (x > 0.4).mean()) df Next, we define the function