@@ -139,9 +139,8 @@ def test_separator_date_conflict(all_parsers):
139
139
tm .assert_frame_equal (df , expected )
140
140
141
141
142
- @xfail_pyarrow
143
142
@pytest .mark .parametrize ("keep_date_col" , [True , False ])
144
- def test_multiple_date_col_custom (all_parsers , keep_date_col ):
143
+ def test_multiple_date_col_custom (all_parsers , keep_date_col , request ):
145
144
data = """\
146
145
KORD,19990127, 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000
147
146
KORD,19990127, 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000
@@ -152,6 +151,14 @@ def test_multiple_date_col_custom(all_parsers, keep_date_col):
152
151
"""
153
152
parser = all_parsers
154
153
154
+ if keep_date_col and parser .engine == "pyarrow" :
155
+ # For this to pass, we need to disable auto-inference on the date columns
156
+ # in parse_dates. We have no way of doing this though
157
+ mark = pytest .mark .xfail (
158
+ reason = "pyarrow doesn't support disabling auto-inference on column numbers."
159
+ )
160
+ request .node .add_marker (mark )
161
+
155
162
def date_parser (* date_cols ):
156
163
"""
157
164
Test date parser.
@@ -301,9 +308,8 @@ def test_concat_date_col_fail(container, dim):
301
308
parsing .concat_date_cols (date_cols )
302
309
303
310
304
- @xfail_pyarrow
305
311
@pytest .mark .parametrize ("keep_date_col" , [True , False ])
306
- def test_multiple_date_col (all_parsers , keep_date_col ):
312
+ def test_multiple_date_col (all_parsers , keep_date_col , request ):
307
313
data = """\
308
314
KORD,19990127, 19:00:00, 18:56:00, 0.8100, 2.8100, 7.2000, 0.0000, 280.0000
309
315
KORD,19990127, 20:00:00, 19:56:00, 0.0100, 2.2100, 7.2000, 0.0000, 260.0000
@@ -313,6 +319,15 @@ def test_multiple_date_col(all_parsers, keep_date_col):
313
319
KORD,19990127, 23:00:00, 22:56:00, -0.5900, 1.7100, 4.6000, 0.0000, 280.0000
314
320
"""
315
321
parser = all_parsers
322
+
323
+ if keep_date_col and parser .engine == "pyarrow" :
324
+ # For this to pass, we need to disable auto-inference on the date columns
325
+ # in parse_dates. We have no way of doing this though
326
+ mark = pytest .mark .xfail (
327
+ reason = "pyarrow doesn't support disabling auto-inference on column numbers."
328
+ )
329
+ request .node .add_marker (mark )
330
+
316
331
kwds = {
317
332
"header" : None ,
318
333
"parse_dates" : [[1 , 2 ], [1 , 3 ]],
@@ -469,7 +484,6 @@ def test_date_col_as_index_col(all_parsers):
469
484
tm .assert_frame_equal (result , expected )
470
485
471
486
472
- @xfail_pyarrow
473
487
def test_multiple_date_cols_int_cast (all_parsers ):
474
488
data = (
475
489
"KORD,19990127, 19:00:00, 18:56:00, 0.8100\n "
@@ -530,7 +544,6 @@ def test_multiple_date_cols_int_cast(all_parsers):
530
544
tm .assert_frame_equal (result , expected )
531
545
532
546
533
- @xfail_pyarrow
534
547
def test_multiple_date_col_timestamp_parse (all_parsers ):
535
548
parser = all_parsers
536
549
data = """05/31/2012,15:30:00.029,1306.25,1,E,0,,1306.25
@@ -1173,7 +1186,6 @@ def test_multiple_date_cols_chunked(all_parsers):
1173
1186
tm .assert_frame_equal (chunks [2 ], expected [4 :])
1174
1187
1175
1188
1176
- @xfail_pyarrow
1177
1189
def test_multiple_date_col_named_index_compat (all_parsers ):
1178
1190
parser = all_parsers
1179
1191
data = """\
@@ -1197,7 +1209,6 @@ def test_multiple_date_col_named_index_compat(all_parsers):
1197
1209
tm .assert_frame_equal (with_indices , with_names )
1198
1210
1199
1211
1200
- @xfail_pyarrow
1201
1212
def test_multiple_date_col_multiple_index_compat (all_parsers ):
1202
1213
parser = all_parsers
1203
1214
data = """\
@@ -1413,7 +1424,6 @@ def test_parse_date_time_multi_level_column_name(all_parsers):
1413
1424
tm .assert_frame_equal (result , expected )
1414
1425
1415
1426
1416
- @xfail_pyarrow
1417
1427
@pytest .mark .parametrize (
1418
1428
"data,kwargs,expected" ,
1419
1429
[
@@ -1503,9 +1513,6 @@ def test_parse_date_time(all_parsers, data, kwargs, expected):
1503
1513
tm .assert_frame_equal (result , expected )
1504
1514
1505
1515
1506
- @xfail_pyarrow
1507
- # From date_parser fallback behavior
1508
- @pytest .mark .filterwarnings ("ignore:elementwise comparison:FutureWarning" )
1509
1516
def test_parse_date_fields (all_parsers ):
1510
1517
parser = all_parsers
1511
1518
data = "year,month,day,a\n 2001,01,10,10.\n 2001,02,1,11."
@@ -1515,7 +1522,7 @@ def test_parse_date_fields(all_parsers):
1515
1522
StringIO (data ),
1516
1523
header = 0 ,
1517
1524
parse_dates = {"ymd" : [0 , 1 , 2 ]},
1518
- date_parser = pd . to_datetime ,
1525
+ date_parser = lambda x : x ,
1519
1526
)
1520
1527
1521
1528
expected = DataFrame (
@@ -1525,7 +1532,6 @@ def test_parse_date_fields(all_parsers):
1525
1532
tm .assert_frame_equal (result , expected )
1526
1533
1527
1534
1528
- @xfail_pyarrow
1529
1535
@pytest .mark .parametrize (
1530
1536
("key" , "value" , "warn" ),
1531
1537
[
@@ -1562,7 +1568,6 @@ def test_parse_date_all_fields(all_parsers, key, value, warn):
1562
1568
tm .assert_frame_equal (result , expected )
1563
1569
1564
1570
1565
- @xfail_pyarrow
1566
1571
@pytest .mark .parametrize (
1567
1572
("key" , "value" , "warn" ),
1568
1573
[
@@ -1599,7 +1604,6 @@ def test_datetime_fractional_seconds(all_parsers, key, value, warn):
1599
1604
tm .assert_frame_equal (result , expected )
1600
1605
1601
1606
1602
- @xfail_pyarrow
1603
1607
def test_generic (all_parsers ):
1604
1608
parser = all_parsers
1605
1609
data = "year,month,day,a\n 2001,01,10,10.\n 2001,02,1,11."
0 commit comments