metobs_toolkit.analysis.Analysis.subset_period#

Analysis.subset_period(startdt: Timestamp | datetime | str, enddt: Timestamp | datetime | str) DataFrame[source]#

Subset the DataFrame to a specific time period.

Parameters:
  • startdt (Union[pd.Timestamp, datetypeclass, str]) – The start date and time of the desired period.

  • enddt (Union[pd.Timestamp, datetypeclass, str]) – The end date and time of the desired period.

Returns:

A DataFrame containing only the rows within the specified time period.

Return type:

pd.DataFrame

Warning

This function modifies the data in place, so filtered-out data will be lost.