Skip to content

Commit 63093c8

Browse files
MarcoGorellimliu08
authored andcommitted
REF change to_datetime -> Timestamp for in odf reader (pandas-dev#49712)
change to_datetime -> Timestamp for single value Co-authored-by: MarcoGorelli <>
1 parent 62c472d commit 63093c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/excel/_odfreader.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ def _get_cell_value(self, cell) -> Scalar | NaTType:
213213
return float(cell_value)
214214
elif cell_type == "date":
215215
cell_value = cell.attributes.get((OFFICENS, "date-value"))
216-
return pd.to_datetime(cell_value)
216+
return pd.Timestamp(cell_value)
217217
elif cell_type == "time":
218-
stamp = pd.to_datetime(str(cell))
218+
stamp = pd.Timestamp(str(cell))
219219
# cast needed here because Scalar doesn't include datetime.time
220220
return cast(Scalar, stamp.time())
221221
else:

0 commit comments

Comments
 (0)