-
Notifications
You must be signed in to change notification settings - Fork 80
Add option day_number_in_year
to DateFlagsTransform
#552
Conversation
@@ -228,11 +239,25 @@ def _get_day_number_in_month(timestamp_series: pd.Series) -> np.ndarray: | |||
"""Generate an array with the number of the day in the month.""" | |||
return timestamp_series.apply(lambda x: x.day).values | |||
|
|||
@staticmethod | |||
def _get_day_number_in_year(timestamp_series: pd.Series) -> np.ndarray: | |||
"""Generate an array with the number of the day in a year, lear year numeration, starts with 1.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Generate an array with the number of the day in a year, lear year numeration, starts with 1.""" | |
"""Generate an array with the numbers of the days in a year, leap year numeration, starts with 1.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get the right variant from the constructor docstring
@@ -34,6 +35,8 @@ def __init__( | |||
if True, add column with weekday info to feature dataframe in transform | |||
day_number_in_month: | |||
if True, add column with day info to feature dataframe in transform | |||
day_number_in_year: | |||
if True, add column with number of day in a year, leap year numeration, starts with 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May you rewrite it to make it clear
May you also remove "regressor_" prefix in out_colum generation logic |
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
==========================================
+ Coverage 87.25% 87.28% +0.02%
==========================================
Files 118 118
Lines 5681 5692 +11
==========================================
+ Hits 4957 4968 +11
Misses 724 724
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Look #546.
Related Issue
#546.
Closing issues
Closes #546.