Skip to content

Commit babed36

Browse files
committed
add test func
1 parent 5f23ace commit babed36

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/io/test_common.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import codecs
66
import errno
77
from functools import partial
8+
import io
89
from io import (
910
BytesIO,
1011
StringIO,
@@ -674,3 +675,11 @@ def test_pickle_reader(reader):
674675
# GH 22265
675676
with BytesIO() as buffer:
676677
pickle.dump(reader, buffer)
678+
679+
680+
def test_pyarrow_read_csv_datetime_dtype():
681+
data = "date,id\n20/12/2025,a\n,b\n31/12/2020,c"
682+
df = pd.read_csv(
683+
io.StringIO(data), parse_dates=["date"], dayfirst=True, dtype_backend="pyarrow"
684+
)
685+
assert (df["date"].dtype) == "datetime64[s]"

0 commit comments

Comments
 (0)