mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-16 08:38:30 +00:00
Check for NULL in ds column
This commit is contained in:
parent
f7becb0942
commit
8383d3bea6
1 changed files with 2 additions and 0 deletions
|
|
@ -174,6 +174,8 @@ class Prophet(object):
|
||||||
if 'y' in df:
|
if 'y' in df:
|
||||||
df['y'] = pd.to_numeric(df['y'])
|
df['y'] = pd.to_numeric(df['y'])
|
||||||
df['ds'] = pd.to_datetime(df['ds'])
|
df['ds'] = pd.to_datetime(df['ds'])
|
||||||
|
if df['ds'].isnull().any():
|
||||||
|
raise ValueError('Found NaN in column ds.')
|
||||||
|
|
||||||
df = df.sort_values('ds')
|
df = df.sort_values('ds')
|
||||||
df.reset_index(inplace=True, drop=True)
|
df.reset_index(inplace=True, drop=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue