Skip to content

Commit d0ea5dc

Browse files
committed
Clean up the fix
1 parent c5d2751 commit d0ea5dc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pandas/core/ops.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -622,11 +622,8 @@ def _is_offset(self, arr_or_obj):
622622
""" check if obj or all elements of list-like is DateOffset """
623623
if isinstance(arr_or_obj, ABCDateOffset):
624624
return True
625-
elif (is_datetime64_dtype(arr_or_obj) or
626-
is_timedelta64_dtype(arr_or_obj)):
627-
# Don't want to check elementwise for Series / array of datetime
628-
return False
629-
elif is_list_like(arr_or_obj) and len(arr_or_obj):
625+
elif (is_list_like(arr_or_obj) and len(arr_or_obj) and
626+
is_object_dtype(arr_or_obj)):
630627
return all(isinstance(x, ABCDateOffset) for x in arr_or_obj)
631628
return False
632629

0 commit comments

Comments
 (0)