We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20d3168 commit aee6b7aCopy full SHA for aee6b7a
pandas/tests/io/parser/test_parse_dates.py
@@ -1975,3 +1975,16 @@ def test_replace_nans_before_parsing_dates(all_parsers):
1975
}
1976
)
1977
tm.assert_frame_equal(result, expected)
1978
+
1979
1980
+@skip_pyarrow
1981
+def test_parse_dates_and_string_dtype(all_parsers):
1982
+ # GH#34066
1983
+ parser = all_parsers
1984
+ data = """a,b
1985
+1,2019-12-31
1986
+"""
1987
+ result = parser.read_csv(StringIO(data), dtype="string", parse_dates=["b"])
1988
+ expected = DataFrame({"a": ["1"], "b": [Timestamp("2019-12-31")]})
1989
+ expected["a"] = expected["a"].astype("string")
1990
+ tm.assert_frame_equal(result, expected)
0 commit comments