(df)
| 2320 | |
| 2321 | |
| 2322 | def test_quantile(df): |
| 2323 | assert_eq(df.x.quantile(), 49.0) |
| 2324 | assert_eq(df.x.quantile(method="dask"), 49.0) |
| 2325 | assert_eq( |
| 2326 | df.x.quantile(q=[0.2, 0.8]), |
| 2327 | pd.Series([19.0, 79.0], index=[0.2, 0.8], name="x"), |
| 2328 | ) |
| 2329 | assert_eq( |
| 2330 | df.x.index.quantile(q=[0.2, 0.8]), |
| 2331 | pd.Series([19.0, 79.0], index=[0.2, 0.8]), |
| 2332 | ) |
| 2333 | |
| 2334 | with pytest.raises(AssertionError): |
| 2335 | df.x.quantile(q=[]).compute() |
| 2336 | |
| 2337 | ser = from_pandas(pd.Series(["a", "b", "c"]), npartitions=2) |
| 2338 | with pytest.raises(ValueError, match="not supported with string|object series"): |
| 2339 | ser.quantile() |
| 2340 | |
| 2341 | |
| 2342 | @pytest.mark.parametrize("join", ["inner", "outer", "left", "right"]) |
nothing calls this directly
no test coverage detected