diff --git a/python/cudf/cudf/tests/test_stats.py b/python/cudf/cudf/tests/test_stats.py index a6dae25dd80..98e3b255aaf 100644 --- a/python/cudf/cudf/tests/test_stats.py +++ b/python/cudf/cudf/tests/test_stats.py @@ -423,6 +423,10 @@ def test_cov1d(data1, data2): ) @pytest.mark.parametrize("method", ["spearman", "pearson"]) def test_corr1d(data1, data2, method): + if method == "spearman": + # Pandas uses scipy.stats.spearmanr code-path + pytest.importorskip("scipy") + gs1 = cudf.Series(data1) gs2 = cudf.Series(data2)