File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -106,16 +106,12 @@ def _convert_cell(value: _CellValue) -> Scalar | NaTType | time:
106106 return val
107107 else :
108108 return value
109- elif isinstance (value , datetime ):
110- # Return datetime.datetime as-is to match openpyxl behavior (GH#59186)
109+ elif isinstance (value , ( datetime , timedelta ) ):
110+ # Return as-is to match openpyxl behavior (GH#59186)
111111 return value
112112 elif isinstance (value , date ):
113113 # Convert date to datetime to match openpyxl behavior (GH#59186)
114114 return datetime (value .year , value .month , value .day )
115- elif isinstance (value , timedelta ):
116- # Return datetime.timedelta as-is to match openpyxl behavior (GH#59186)
117- # (previously returned pd.Timedelta)
118- return value
119115 elif isinstance (value , time ):
120116 return value
121117
You can’t perform that action at this time.
0 commit comments