File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -271,15 +271,15 @@ def _python_datetime_to_int_timestamp(
271271 return cast (Sequence [np .int_ ], values .astype ("datetime64[s]" ).astype (np .int_ ))
272272
273273 int_timestamps = []
274- for sub_value in values :
275- if isinstance (sub_value , datetime ):
276- int_timestamps .append (int (sub_value .timestamp ()))
277- elif isinstance (sub_value , Timestamp ):
278- int_timestamps .append (int (sub_value .ToSeconds ()))
279- elif isinstance (sub_value , np .datetime64 ):
280- int_timestamps .append (sub_value .astype ("datetime64[s]" ).astype (np .int_ ))
274+ for value in values :
275+ if isinstance (value , datetime ):
276+ int_timestamps .append (int (value .timestamp ()))
277+ elif isinstance (value , Timestamp ):
278+ int_timestamps .append (int (value .ToSeconds ()))
279+ elif isinstance (value , np .datetime64 ):
280+ int_timestamps .append (value .astype ("datetime64[s]" ).astype (np .int_ ))
281281 else :
282- int_timestamps .append (int (sub_value ))
282+ int_timestamps .append (int (value ))
283283 return int_timestamps
284284
285285
You can’t perform that action at this time.
0 commit comments