Skip to content

Commit

Permalink
Fix docstring examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KishManani committed Dec 29, 2022
1 parent 9e8695b commit 14368f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sktime/transformations/series/time_since.py
Expand Up @@ -58,13 +58,13 @@ class TimeSince(BaseTransformer):
>>> from sktime.transformations.series.time_since import TimeSince
>>> X = load_airline()
Create a single column with time elapsed since start date of time series.
The output is in units of integer number of months, same as the index `freq`.
Create a single column with time elapsed since start date of time series.
The output is in units of integer number of months, same as the index `freq`.
>>> transformer = TimeSince()
>>> Xt = transformer.fit_transform(X)
Create multiple columns with different start times. The output is in units
of integer number of months, same as the index `freq`.
Create multiple columns with different start times. The output is in units
of integer number of months, same as the index `freq`.
>>> transformer = TimeSince(["2000-01", "2000-02"])
>>> Xt = transformer.fit_transform(X)
"""
Expand Down Expand Up @@ -229,7 +229,7 @@ def _transform(self, X, y=None):
freq_ = _remove_digits_from_str(self.freq_)
freq_period = get_period_alias(freq_)

# Convert `start` and datetime index to period.
# Convert `start` and datetime index to integers.
start_period = pd.Period(start_, freq=freq_period)
time_index_period = time_index.to_period(freq=freq_period)
# Compute time differences and convert to integers.
Expand Down

0 comments on commit 14368f9

Please sign in to comment.