You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function doesn't correctly create the leads. For example, setting leads to 1, it just copies the existing columns under a new column named: {name}_lead_0. See the attached screenshot for an example.
def make_leads(ts, leads, name='y'):
return pd.concat(
{f'{name}lead{i}': ts.shift(-i)
for i in reversed(range(leads))},
axis=1)
The text was updated successfully, but these errors were encountered:
Bug in the following file: https://github.com/Kaggle/learntools/blob/master/learntools/time_series/utils.py
The function doesn't correctly create the leads. For example, setting leads to 1, it just copies the existing columns under a new column named: {name}_lead_0. See the attached screenshot for an example.
def make_leads(ts, leads, name='y'):
return pd.concat(
{f'{name}lead{i}': ts.shift(-i)
for i in reversed(range(leads))},
axis=1)
The text was updated successfully, but these errors were encountered: