Documentation

API Reference

Duration

Describing some time duration is surprisingly common in feature engineering workflows. Fennel lets you express durations in an easy to read natural language as described below

SignifierUnit
yYear
wWeek
dDay
hHour
mMinute
sSecond

Examples:

  1. "7h" -> 7 hours
  2. "12d" -> 12 days
  3. "2y" -> 2 years
  4. "3h 20m 4s" -> 3 hours 20 minutes and 4 seconds
  5. "2y 4w" -> 2 years and 4 weeks

Info

A year is not a fixed amount of time but is hardcoded to be exactly 365 days

Note that there is no shortcut for month because there is a very high degree of variance in month's duration- some months are 28 days, some are 30 days and some are 31 days. A common convention in feature engineering is to use 4 weeks to describe a month.