diff --git a/tests/examples_arguments_syntax/bump_chart.py b/tests/examples_arguments_syntax/bump_chart.py index 102784590..1586b956e 100644 --- a/tests/examples_arguments_syntax/bump_chart.py +++ b/tests/examples_arguments_syntax/bump_chart.py @@ -12,7 +12,7 @@ import pandas as pd stocks = data.stocks() -source = stocks.groupby([pd.Grouper(key="date", freq="6ME"),"symbol"]).mean().reset_index() +source = stocks.groupby([pd.Grouper(key="date", freq="6M"),"symbol"]).mean().reset_index() alt.Chart(source).mark_line(point = True).encode( x = alt.X("date:O", timeUnit="yearmonth", title="date"), diff --git a/tests/examples_methods_syntax/bump_chart.py b/tests/examples_methods_syntax/bump_chart.py index 0c31b06e7..03f88c8ac 100644 --- a/tests/examples_methods_syntax/bump_chart.py +++ b/tests/examples_methods_syntax/bump_chart.py @@ -12,7 +12,7 @@ import pandas as pd stocks = data.stocks() -source = stocks.groupby([pd.Grouper(key="date", freq="6ME"),"symbol"]).mean().reset_index() +source = stocks.groupby([pd.Grouper(key="date", freq="6M"),"symbol"]).mean().reset_index() alt.Chart(source).mark_line(point=True).encode( x=alt.X("date:O").timeUnit("yearmonth").title("date"), diff --git a/tests/utils/test_utils.py b/tests/utils/test_utils.py index 425d2297d..aa49e9369 100644 --- a/tests/utils/test_utils.py +++ b/tests/utils/test_utils.py @@ -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"), } ) @@ -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) diff --git a/tests/vegalite/v5/test_api.py b/tests/vegalite/v5/test_api.py index 4e62ac46a..c0d70d0ac 100644 --- a/tests/vegalite/v5/test_api.py +++ b/tests/vegalite/v5/test_api.py @@ -115,7 +115,7 @@ def Chart(data): def test_chart_infer_types(): data = pd.DataFrame( { - "x": pd.date_range("2012", periods=10, freq="YE"), + "x": pd.date_range("2012", periods=10, freq="Y"), "y": range(10), "c": list("abcabcabca"), "s": pd.Categorical([1, 2] * 5, categories=[2, 1], ordered=True), @@ -220,7 +220,7 @@ def test_multiple_encodings(args, kwargs): def test_chart_operations(): data = pd.DataFrame( { - "x": pd.date_range("2012", periods=10, freq="YE"), + "x": pd.date_range("2012", periods=10, freq="Y"), "y": range(10), "c": list("abcabcabca"), }