pandas.DatetimeIndex.freq — pandas 3.0.0.dev0+2104.ge637b4290d documentation (original) (raw)
property DatetimeIndex.freq[source]#
Return the frequency object if it is set, otherwise None.
To learn more about the frequency strings, please seethis link.
See also
Return the frequency object if it is set, otherwise None.
Return the frequency object if it is set, otherwise None.
Examples
datetimeindex = pd.date_range( ... "2022-02-22 02:22:22", periods=10, tz="America/Chicago", freq="h" ... ) datetimeindex DatetimeIndex(['2022-02-22 02:22:22-06:00', '2022-02-22 03:22:22-06:00', '2022-02-22 04:22:22-06:00', '2022-02-22 05:22:22-06:00', '2022-02-22 06:22:22-06:00', '2022-02-22 07:22:22-06:00', '2022-02-22 08:22:22-06:00', '2022-02-22 09:22:22-06:00', '2022-02-22 10:22:22-06:00', '2022-02-22 11:22:22-06:00'], dtype='datetime64[ns, America/Chicago]', freq='h') datetimeindex.freq