Skip to content

Commit

Permalink
chore: avoid pandas warning for freq='H' in test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli authored Jun 27, 2024
1 parent 6b5a867 commit 374a07f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def test_sanitize_dataframe():
"f": np.arange(5, dtype=float),
"i": np.arange(5, dtype=int),
"b": np.array([True, False, True, True, False]),
"d": pd.date_range("2012-01-01", periods=5, freq="H"),
"d": pd.date_range("2012-01-01", periods=5, freq="h"),
"c": pd.Series(list("ababc"), dtype="category"),
"c2": pd.Series([1, "A", 2.5, "B", None], dtype="category"),
"o": pd.Series([np.array(i) for i in range(5)]),
"p": pd.date_range("2012-01-01", periods=5, freq="H").tz_localize("UTC"),
"p": pd.date_range("2012-01-01", periods=5, freq="h").tz_localize("UTC"),
}
)

Expand Down Expand Up @@ -98,9 +98,9 @@ def test_sanitize_dataframe_arrow_columns():
"f": np.arange(5, dtype=float),
"i": np.arange(5, dtype=int),
"b": np.array([True, False, True, True, False]),
"d": pd.date_range("2012-01-01", periods=5, freq="H"),
"d": pd.date_range("2012-01-01", periods=5, freq="h"),
"c": pd.Series(list("ababc"), dtype="category"),
"p": pd.date_range("2012-01-01", periods=5, freq="H").tz_localize("UTC"),
"p": pd.date_range("2012-01-01", periods=5, freq="h").tz_localize("UTC"),
}
)
df_arrow = pa.Table.from_pandas(df).to_pandas(types_mapper=pd.ArrowDtype)
Expand Down Expand Up @@ -129,9 +129,9 @@ def test_sanitize_pyarrow_table_columns():
"f": np.arange(5, dtype=float),
"i": np.arange(5, dtype=int),
"b": np.array([True, False, True, True, False]),
"d": pd.date_range("2012-01-01", periods=5, freq="H"),
"d": pd.date_range("2012-01-01", periods=5, freq="h"),
"c": pd.Series(list("ababc"), dtype="category"),
"p": pd.date_range("2012-01-01", periods=5, freq="H").tz_localize("UTC"),
"p": pd.date_range("2012-01-01", periods=5, freq="h").tz_localize("UTC"),
}
)

Expand Down

0 comments on commit 374a07f

Please sign in to comment.