| 1506 | ], |
| 1507 | ) |
| 1508 | def test_melt(kwargs): |
| 1509 | pdf = pd.DataFrame( |
| 1510 | { |
| 1511 | "obj": list("abcd") * 5, |
| 1512 | "s1": list("XY") * 10, |
| 1513 | "s2": list("abcde") * 4, |
| 1514 | "int": np.random.randn(20), |
| 1515 | } |
| 1516 | ) |
| 1517 | # Test that `string[pyarrow]` dtypes give the same result with `pandas` and `dask` |
| 1518 | pdf = pdf.astype({"s1": "string[pyarrow]", "s2": "string[pyarrow]"}) |
| 1519 | |
| 1520 | ddf = dd.from_pandas(pdf, 4) |
| 1521 | |
| 1522 | list_eq(dd.melt(ddf, **kwargs), pd.melt(pdf, **kwargs)) |
| 1523 | # test again as DataFrame method |
| 1524 | list_eq(ddf.melt(**kwargs), pdf.melt(**kwargs)) |
| 1525 | |
| 1526 | |
| 1527 | def test_cheap_inner_merge_with_pandas_object(): |