Skip to content

Commit 7299ee5

Browse files
committed
Replace integer for float in timestamps to fit 32-bit limit
1 parent ab06b2b commit 7299ee5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2338,7 +2338,7 @@ def to_rdata(
23382338
Raises
23392339
------
23402340
LibrdataWriterError
2341-
* If DataFrame types or values not translatable to R data types.
2341+
* If DataFrame types or values do not conform to R data types.
23422342
23432343
See Also
23442344
--------

pandas/tests/io/test_rdata.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,10 @@ def test_write_read_dtypes(rtype, comp):
720720

721721
dts = [
722722
Timestamp.min.ceil("S"),
723-
Timestamp(-(10 ** 18)),
723+
Timestamp(-(10.0 ** 18.0)).ceil("S"),
724724
Timestamp(0),
725725
Timestamp.now().floor("S"),
726-
Timestamp(10 ** 18),
726+
Timestamp(10.0 ** 18.0).floor("S"),
727727
Timestamp.max.floor("S"),
728728
]
729729

@@ -737,7 +737,7 @@ def test_write_read_dtypes(rtype, comp):
737737
),
738738
"interval": interval_range(start=10, periods=6, freq=10 * 2),
739739
"bool": [False, True, True, True, False, False],
740-
"int": [2 ** 10 - 1, 1, -(2 ** 10) + 1, -1, 0, 10 ** 9],
740+
"int": [2 ** 20 - 1, 1, -(2 ** 20) + 1, -1, 0, 10 ** 9],
741741
"float": [0, np.pi, float("nan"), np.e, np.euler_gamma, 0],
742742
"string": array(
743743
["acidification", "change", "loss", "use", "depletion", "aersols"],

0 commit comments

Comments
 (0)