0

I'm trying to follow the basic tutorial for fbprophet and am getting an error that doesn't really make sense on the Prophet.predict() method. My code follows the tutorial exactly:

import pandas as pd
import numpy as np
from fbprophet import Prophet

df = pd.read_csv("example_wp_peyton_manning.csv")
df['y'] = np.log(df['y'])
m = Prophet()
m.fit(df)
future = m.make_future_dataframe(periods = 365)
forecast = m.predict(future)

on the predict method, I get

ValueError: If using all scalar values, you must pass an index

I've seen this before when trying to use DataFrame constructors improperly, but this seems to be happening under the hood in the fbprophet code, which is strange because the passed dataframe comes from the package's own make_future_dataframe method. Has anyone else experienced this/know a work-around?

For context, I'm using Python 3.6.0, with Visual C++ 14.0, Numpy 1.13.1, Pandas 0.21.0, pystan 2.17.0.0 and fbprophet 0.2

There doesn't seem to be a tag for fbprophet and I don't have the reputation to make one

kevins_1
  • 1,268
  • 2
  • 9
  • 27
Jacob H
  • 345
  • 1
  • 11

2 Answers2

0

I got some other error but it works after adding:

...
m = Prophet()
m.daily_seasonality=True
...

enter image description here

ChaosPredictor
  • 3,777
  • 1
  • 36
  • 46
0

Maybe you should try python 2.

ChaosPredictor
  • 3,777
  • 1
  • 36
  • 46