We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5d2751 commit d0ea5dcCopy full SHA for d0ea5dc
pandas/core/ops.py
@@ -622,11 +622,8 @@ def _is_offset(self, arr_or_obj):
622
""" check if obj or all elements of list-like is DateOffset """
623
if isinstance(arr_or_obj, ABCDateOffset):
624
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):
+ elif (is_list_like(arr_or_obj) and len(arr_or_obj) and
+ is_object_dtype(arr_or_obj)):
630
return all(isinstance(x, ABCDateOffset) for x in arr_or_obj)
631
return False
632
0 commit comments