Skip to content

Commit af2a46f

Browse files
committed
BUG: more nano fixes
1 parent 83397d1 commit af2a46f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pandas/src/engines.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ cdef class DatetimeEngine(Int64Engine):
436436

437437

438438
cdef inline _to_i8(object val):
439+
cdef pandas_datetimestruct dts
439440
if util.is_datetime64_object(val):
440441
val = unbox_datetime64_scalar(val)
441442
elif PyDateTime_Check(val):
442-
val = np.datetime64(val)
443-
val = unbox_datetime64_scalar(val)
443+
return _pydatetime_to_dts(val, &dts)
444444
return val
445445

446446
# ctypedef fused idxvalue_t:

pandas/tseries/offsets.py

+4
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,10 @@ class Day(Tick, CacheableOffset):
10071007
_inc = timedelta(1)
10081008
_rule_base = 'D'
10091009

1010+
def isAnchored(self):
1011+
1012+
return False
1013+
10101014
class Hour(Tick):
10111015
_inc = timedelta(0, 3600)
10121016
_rule_base = 'H'

0 commit comments

Comments
 (0)