updated the change a bit to prevent unnessary copy operations

This commit is contained in:
Florian Roessler 2019-08-29 15:05:43 +02:00 committed by Ben Letham
parent 5bc6565c11
commit e1a2b9c297

View file

@ -262,8 +262,10 @@ class Prophet(object):
raise ValueError('Found non-boolean in column ' + condition_name)
df[condition_name] = df[condition_name].astype('bool')
df = df.reset_index(drop=True)
if df.index.name == 'ds':
df.index.name = None
df = df.sort_values('ds')
df = df.reset_index(drop=True)
self.initialize_scales(initialize_scales, df)