Skip to content

Commit 1763c6f

Browse files
authored
Remvoe pandas 2 checks (#1100)
1 parent fc02292 commit 1763c6f

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

dask_expr/_reductions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from dask.array import chunk
88
from dask.array.reductions import moment_agg, moment_chunk, moment_combine, nannumel
99
from dask.dataframe import hyperloglog, methods
10-
from dask.dataframe._compat import PANDAS_GE_200
1110
from dask.dataframe.core import (
1211
_concat,
1312
_cov_corr_agg,
@@ -633,7 +632,7 @@ def chunk_kwargs(self):
633632
out = {"keep": self.keep}
634633
if is_dataframe_like(self.frame._meta):
635634
out["subset"] = self.subset
636-
if PANDAS_GE_200 and not is_index_like(self.frame._meta):
635+
if not is_index_like(self.frame._meta):
637636
out["ignore_index"] = self.ignore_index
638637
return out
639638

dask_expr/tests/test_datasets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33

44
import pytest
5-
from dask.dataframe._compat import PANDAS_GE_200
65

76
from dask_expr import new_collection
87
from dask_expr._expr import Lengths
@@ -124,7 +123,7 @@ def test_timeseries_gaph_size(seed):
124123
graph_size = sys.getsizeof(pickle.dumps(df.dask))
125124
graph_size_dd = sys.getsizeof(pickle.dumps(dict(ddf.dask)))
126125
# Make sure we are close to the dask.dataframe graph size
127-
threshold = 1.10 if PANDAS_GE_200 else 1.50
126+
threshold = 1.10
128127
assert graph_size < threshold * graph_size_dd
129128

130129

dask_expr/tests/test_map_partitions_overlap.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import numpy as np
44
import pytest
5-
from dask.dataframe._compat import PANDAS_GE_200
65

76
from dask_expr import from_pandas, map_overlap, map_partitions
87
from dask_expr.tests._util import _backend_library, assert_eq
@@ -64,8 +63,6 @@ def test_map_partitions_merge(opt):
6463
# Check result with/without fusion
6564
expect = pdf1.merge(pdf2, on="x")
6665
df3 = (df3.optimize() if opt else df3)[list(expect.columns)]
67-
if not PANDAS_GE_200:
68-
df3 = df3.reset_index(drop=True)
6966
assert_eq(df3, expect, check_index=False)
7067

7168

dask_expr/tests/test_string_accessor.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
from dask.dataframe._compat import PANDAS_GE_200
32

43
from dask_expr._collection import DataFrame, from_pandas
54
from dask_expr.tests._util import _backend_library, assert_eq
@@ -28,14 +27,7 @@ def dser(ser):
2827
("contains", {"pat": "a"}),
2928
("count", {"pat": "a"}),
3029
("endswith", {"pat": "a"}),
31-
pytest.param(
32-
"extract",
33-
{"pat": r"[ab](\d)"},
34-
marks=pytest.mark.skipif(
35-
not PANDAS_GE_200,
36-
reason="Index metadata wrong for pandas<2.0",
37-
),
38-
),
30+
("extract", {"pat": r"[ab](\d)"}),
3931
("extractall", {"pat": r"[ab](\d)"}),
4032
("find", {"sub": "a"}),
4133
("findall", {"pat": "a"}),

0 commit comments

Comments
 (0)