get_date_summary

get_date_summary(idx, engine='pandas')

Returns a summary of the date-related information, including the number of dates, the time zone, the start date, and the end date.

Parameters

Name Type Description Default
idx pd.Series or pd.DateTimeIndex The parameter idx can be either a pandas Series or a pandas DateTimeIndex. It represents the dates or timestamps for which we want to generate a summary. required
engine str The engine parameter is used to specify the engine to use for generating a date summary. It can be either โ€œpandasโ€ or โ€œpolarsโ€. Default is โ€œpandasโ€. 'pandas'

Returns

Name Type Description
pd.DataFrame A pandas DataFrame with the following columns: - date_n: The number of dates in the index. - date_tz: The time zone of the dates in the index. - date_start: The first date in the index. - date_end: The last date in the index.

Notes

  • When using the โ€˜polarsโ€™ engine, timezone information is derived from the pandas input before conversion, as Polars does not natively preserve it.