poets.timedate package

Submodules

poets.timedate.dateindex module

poets.timedate.dateindex.get_dtindex(interval, begin, end=None)[source]

Creates a pandas datetime index for a given interval.

Parameters:

interval : str or int

Interval of the datetime index. Integer values will be treated as days.

begin : datetime

Datetime index start date.

end : datetime, optional

Datetime index end date, defaults to current date.

Returns:

dtindex : pandas.tseries.index.DatetimeIndex

Datetime index.

poets.timedate.dekad module

This module provides functions for date manipulation on a dekadal basis.

poets.timedate.dekad.check_dekad(date)[source]

Checks the dekad of a date and returns the dekad date.

Parameters:

date : datetime

Date to check.

Returns:

new_date : datetime

Date of the dekad.

poets.timedate.dekad.day2dekad(day)[source]

Returns the dekad of a day.

Parameters:

day : int

Day of the date.

Returns:

dekad : int

Number of the dekad in a month.

poets.timedate.dekad.dekad2day(year, month, dekad)[source]

Gets the day of a dekad.

Parameters:

year : int

Year of the date.

month : int

Month of the date.

dekad : int

Dekad of the date.

Returns:

day : int

Day value for the dekad.

poets.timedate.dekad.dekad_index(begin, end=None)[source]

Creates a pandas datetime index on a decadal basis.

Parameters:

begin : datetime

Datetime index start date.

end : datetime, optional

Datetime index end date, set to current date if None.

Returns:

dtindex : pandas.DatetimeIndex

Dekadal datetime index.

poets.timedate.dekad.get_dekad_period(dates)[source]

Checks number of the dekad in the current year for dates given as list.

Parameters:

dates : list of datetime

Dates to check.

Returns:

period : list of int

List of dekad periods.

Module contents

Table Of Contents

Previous topic

poets.shape package

This Page