@@ -375,56 +375,6 @@ def is_categorical(arr) -> bool:
375375 return isinstance (arr , ABCCategorical ) or is_categorical_dtype (arr )
376376
377377
378- def is_datetimetz (arr ) -> bool :
379- """
380- Check whether an array-like is a datetime array-like with a timezone
381- component in its dtype.
382-
383- .. deprecated:: 0.24.0
384-
385- Parameters
386- ----------
387- arr : array-like
388- The array-like to check.
389-
390- Returns
391- -------
392- boolean
393- Whether or not the array-like is a datetime array-like with a
394- timezone component in its dtype.
395-
396- Examples
397- --------
398- >>> is_datetimetz([1, 2, 3])
399- False
400-
401- Although the following examples are both DatetimeIndex objects,
402- the first one returns False because it has no timezone component
403- unlike the second one, which returns True.
404-
405- >>> is_datetimetz(pd.DatetimeIndex([1, 2, 3]))
406- False
407- >>> is_datetimetz(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
408- True
409-
410- The object need not be a DatetimeIndex object. It just needs to have
411- a dtype which has a timezone component.
412-
413- >>> dtype = DatetimeTZDtype("ns", tz="US/Eastern")
414- >>> s = pd.Series([], dtype=dtype)
415- >>> is_datetimetz(s)
416- True
417- """
418-
419- warnings .warn (
420- "'is_datetimetz' is deprecated and will be removed in a "
421- "future version. Use 'is_datetime64tz_dtype' instead." ,
422- FutureWarning ,
423- stacklevel = 2 ,
424- )
425- return is_datetime64tz_dtype (arr )
426-
427-
428378def is_offsetlike (arr_or_obj ) -> bool :
429379 """
430380 Check if obj or all elements of list-like is DateOffset
@@ -456,43 +406,6 @@ def is_offsetlike(arr_or_obj) -> bool:
456406 return False
457407
458408
459- def is_period (arr ) -> bool :
460- """
461- Check whether an array-like is a periodical index.
462-
463- .. deprecated:: 0.24.0
464-
465- Parameters
466- ----------
467- arr : array-like
468- The array-like to check.
469-
470- Returns
471- -------
472- boolean
473- Whether or not the array-like is a periodical index.
474-
475- Examples
476- --------
477- >>> is_period([1, 2, 3])
478- False
479- >>> is_period(pd.Index([1, 2, 3]))
480- False
481- >>> is_period(pd.PeriodIndex(["2017-01-01"], freq="D"))
482- True
483- """
484-
485- warnings .warn (
486- "'is_period' is deprecated and will be removed in a future "
487- "version. Use 'is_period_dtype' or is_period_arraylike' "
488- "instead." ,
489- FutureWarning ,
490- stacklevel = 2 ,
491- )
492-
493- return isinstance (arr , ABCPeriodIndex ) or is_period_arraylike (arr )
494-
495-
496409def is_datetime64_dtype (arr_or_dtype ) -> bool :
497410 """
498411 Check whether an array-like or dtype is of the datetime64 dtype.
0 commit comments