Skip to content

Commit 27f8b73

Browse files
TST: add a test on mixed offsets for read_csv (pandas-dev#54245) (#19)
* TST: add a test on mixed offsets for read_csv * change the location of the test * add parser to the test Co-authored-by: Natalia Mokeeva <[email protected]>
1 parent 3a089a8 commit 27f8b73

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pandas/tests/io/parser/test_parse_dates.py

+16
Original file line numberDiff line numberDiff line change
@@ -2237,3 +2237,19 @@ def test_parse_dates_arrow_engine(all_parsers):
22372237
}
22382238
)
22392239
tm.assert_frame_equal(result, expected)
2240+
2241+
2242+
@xfail_pyarrow
2243+
def test_from_csv_with_mixed_offsets(all_parsers):
2244+
parser = all_parsers
2245+
data = "a\n2020-01-01T00:00:00+01:00\n2020-01-01T00:00:00+00:00"
2246+
result = parser.read_csv(StringIO(data), parse_dates=["a"])["a"]
2247+
expected = Series(
2248+
[
2249+
Timestamp("2020-01-01 00:00:00+01:00"),
2250+
Timestamp("2020-01-01 00:00:00+00:00"),
2251+
],
2252+
name="a",
2253+
index=[0, 1],
2254+
)
2255+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)