Skip to content

Commit

Permalink
refactor: prevent pandas deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Jul 6, 2023
1 parent 95364e0 commit 3cd224e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/popmon/analysis/test_hist_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/popmon/hist/test_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3cd224e

Please sign in to comment.