season

season#

Determine the season for a given date.

See season for usage examples.

API Reference#

pyedautils.data_prep.season.get_season(date, hemisphere: str = 'north', labels: List[str] = ['Spring', 'Summer', 'Fall', 'Winter'], tracking_type: str = 'astronomical') → str[source]#

Return the season of the given date depending on the latitude and location.

Parameters:
  • date – datetime object or pandas Series with datetime objects

  • hemisphere – “north” or “south”, default is “north”

  • labels – array of season names, default is [“Spring”, “Summer”, “Fall”, “Winter”]

  • tracking_type – Type of season definition. Options are “meteorological” or “astronomical”. Default is “astronomical”

Returns:

A string with season name or a pandas series with strings, depending on the input