Module chronax.freq_seconds
Convert benchmark time_freq strings (pandas / DataLoader) to seconds for TOTO.
freq_to_seconds
chronax.freq_seconds.freq_to_seconds(freq)
Convert a frequency string with an increment to seconds.
| Parameter | Type | Default | Description |
|---|---|---|---|
| freq | Union[str, float, int] |
- | Accepts forms like: '15m', '30min', '45sec', '2h', '1.5h', '4w', '12mth', '1y', '250ms', '10us', '100ns', pandas-style short forms: '2H', '15MIN', '30S', 'YE', 'YS', 'ME'. Week anchors like 'W-MON' are treated as a week. |
Returns: float
Raises:
* ValueError: If the frequency string is unsupported or cannot be parsed.