class_docstr: Immutable ndarray-like of datetime64 data.
  
  Parameters
  ----------
  data : array-like (1-dimensional), optional
      Optional datetime-like data to construct index with.
  freq : str or pandas offset object, optional
      One of pandas date offset strings or corresponding objects. The string
      'infer' can be passed in order to set the frequency of the index as the
      inferred frequency upon creation.
  normalize : bool, default False
      Normalize start/end dates to midnight before generating date range.
  
      .. deprecated:: 4.0.0
  
  closed : {'left', 'right'}, optional
      Set whether to include `start` and `end` that are on the
      boundary. The default includes boundary points on either end.
  
      .. deprecated:: 4.0.0
  
  ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
      When clocks moved backward due to DST, ambiguous times may arise.
      For example in Central European Time (UTC+01), when going from 03:00
      DST to 02:00 non-DST, 02:30:00 local time occurs both at 00:30:00 UTC
      and at 01:30:00 UTC. In such a situation, the `ambiguous` parameter
      dictates how ambiguous times should be handled.
  
      - 'infer' will attempt to infer fall dst-transition hours based on
        order
      - bool-ndarray where True signifies a DST time, False signifies a
        non-DST time (note that this flag is only applicable for ambiguous
        times)
      - 'NaT' will return NaT where there are ambiguous times
      - 'raise' will raise an AmbiguousTimeError if there are ambiguous times.
  dayfirst : bool, default False
      If True, parse dates in `data` with the day first order.
  yearfirst : bool, default False
      If True parse dates in `data` with the year first order.
  dtype : numpy.dtype or str, default None
      Note that the only NumPy dtype allowed is ‘datetime64[ns]’.
  copy : bool, default False
      Make a copy of input ndarray.
  name : label, default None
      Name to be stored in the index.
  
  See Also
  --------
  Index : The base pandas Index type.
  to_datetime : Convert argument to datetime.
  
  Examples
  --------
  >>> ps.DatetimeIndex(['1970-01-01', '1970-01-01', '1970-01-01'])
  DatetimeIndex(['1970-01-01', '1970-01-01', '1970-01-01'], dtype='datetime64[ns]', freq=None)
  
  From a Series:
  
  >>> from datetime import datetime
  >>> s = ps.Series([datetime(2021, 3, 1), datetime(2021, 3, 2)], index=[10, 20])
  >>> ps.DatetimeIndex(s)
  DatetimeIndex(['2021-03-01', '2021-03-02'], dtype='datetime64[ns]', freq=None)
  
  From an Index:
  
  >>> idx = ps.DatetimeIndex(['1970-01-01', '1970-01-01', '1970-01-01'])
  >>> ps.DatetimeIndex(idx)
  DatetimeIndex(['1970-01-01', '1970-01-01', '1970-01-01'], dtype='datetime64[ns]', freq=None)
code: def days_in_month(self) -> Index:
      warnings.warn(
          "`days_in_month` will return int32 index instead of int 64 index in 4.0.0.",
          FutureWarning,
      )
      return Index(self.to_series().dt.days_in_month)
  
imports: import datetime
  import warnings
  from functools import partial
  from typing import Any, Optional, Union, cast, no_type_check
  import pandas
  from pandas.api.types import is_hashable
  from pandas.tseries.offsets import DateOffset
  from pyspark._globals import _NoValue
  from pyspark import pandas
  from pyspark.pandas import DataFrame
  from pyspark.pandas.indexes.base import Index
  from pyspark.pandas.missing.indexes import MissingPandasLikeDatetimeIndex
  from pyspark.pandas.series import Series, first_series
  from pyspark.pandas.utils import verify_temp_column_name
label_desc: Use image node_id 25 for calling the DatetimeIndex obj's underlying member method code with example usage: obj.days_in_month() and returns: Index