From 3cd224ee09061ee5230490904b628c2d8af32fae Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Wed, 15 Feb 2023 22:38:35 +0100 Subject: [PATCH] refactor: prevent pandas deprecation warning --- tests/popmon/analysis/test_hist_numpy.py | 8 ++++---- tests/popmon/hist/test_histogram.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/popmon/analysis/test_hist_numpy.py b/tests/popmon/analysis/test_hist_numpy.py index 03b72ecc..d33da9de 100644 --- a/tests/popmon/analysis/test_hist_numpy.py +++ b/tests/popmon/analysis/test_hist_numpy.py @@ -30,7 +30,7 @@ def get_test_histograms1(): """Get set 1 of test histograms""" # dummy dataset with mixed types # convert timestamp (col D) to nanosec since 1970-1-1 - df = pd.util.testing.makeMixedDataFrame() + df = pd._testing.makeMixedDataFrame() df["date"] = df["D"].apply(to_ns) df["boolT"] = True df["boolF"] = False @@ -56,7 +56,7 @@ def get_test_histograms2(): """Get set 2 of test histograms""" # dummy dataset with mixed types # convert timestamp (col D) to nanosec since 1970-1-1 - df = pd.util.testing.makeMixedDataFrame() + df = pd._testing.makeMixedDataFrame() # building 1d-, 2d-histogram (iteratively) hist1 = hg.Categorize(unit("C")) @@ -351,7 +351,7 @@ def test_check_similar_hists(): """ # dummy dataset with mixed types # convert timestamp (col D) to nanosec since 1970-1-1 - df = pd.util.testing.makeMixedDataFrame() + df = pd._testing.makeMixedDataFrame() df["date"] = df["D"].apply(to_ns) # building 1d-, 2d-, and 3d-histogram (iteratively) @@ -391,7 +391,7 @@ def test_assert_similar_hists(): """ # dummy dataset with mixed types # convert timestamp (col D) to nanosec since 1970-1-1 - df = pd.util.testing.makeMixedDataFrame() + df = pd._testing.makeMixedDataFrame() df["date"] = df["D"].apply(to_ns) # building 1d-, 2d-, and 3d-histogram (iteratively) diff --git a/tests/popmon/hist/test_histogram.py b/tests/popmon/hist/test_histogram.py index c2a1888a..18d83e17 100644 --- a/tests/popmon/hist/test_histogram.py +++ b/tests/popmon/hist/test_histogram.py @@ -15,7 +15,7 @@ def get_test_data(): - df = pd.util.testing.makeMixedDataFrame() + df = pd._testing.makeMixedDataFrame() df["date"] = df["D"].apply(lambda x: pd.to_datetime(x).value) return df