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 236d89b commit 8c0c6acCopy full SHA for 8c0c6ac
pandas/tests/io/test_feather.py
@@ -1,6 +1,7 @@
1
"""test feather-format compat"""
2
3
import zoneinfo
4
+from datetime import datetime
5
6
import numpy as np
7
import pytest
@@ -247,3 +248,16 @@ def test_string_inference(self, tmp_path):
247
248
result = read_feather(path)
249
expected = pd.DataFrame(data={"a": ["x", "y"]}, dtype="string[pyarrow_numpy]")
250
tm.assert_frame_equal(result, expected)
251
+
252
+ def test_out_of_bounds_datetime_to_feather(self):
253
+ # GH#47832
254
+ df = pd.DataFrame({"date": [
255
+ datetime.fromisoformat("1654-01-01"),
256
+ datetime.fromisoformat("1920-01-01"),
257
+ ],})
258
259
+ feather_path = "tmp.feather"
260
+ to_feather(feather_path)
261
+ expected = df.copy()
262
+ result = read_feather(feather_path)
263
+ tm.assert_frame_equal(result, expected)
0 commit comments