{"id":1637,"library":"prophet","title":"Prophet","description":"Prophet is an automatic forecasting procedure developed by Facebook. It is designed for analyzing time series that exhibit strong seasonal effects and has several seasons of historical data. The current version is 1.3.0, and it maintains a regular release cadence with frequent updates and bug fixes.","status":"active","version":"1.3.0","language":"en","source_language":"en","source_url":"https://github.com/facebook/prophet","tags":["time series","forecasting","machine learning","statistics","facebook"],"install":[{"cmd":"pip install prophet","lang":"bash","label":"Standard installation"}],"dependencies":[{"reason":"Prophet relies on CmdStanPy for interfacing with Stan, which is the probabilistic programming language used for the underlying statistical model. Installation can sometimes be complex, requiring a C++ compiler.","package":"cmdstanpy"},{"reason":"Required for data manipulation, particularly for the input and output DataFrames (`ds`, `y`).","package":"pandas"},{"reason":"Core numerical operations and data structures.","package":"numpy"}],"imports":[{"note":"The library was renamed from 'fbprophet' to 'prophet'. Using 'fbprophet' will result in an ImportError as it is deprecated and no longer maintained.","wrong":"from fbprophet import Prophet","symbol":"Prophet","correct":"from prophet import Prophet"}],"quickstart":{"code":"import pandas as pd\nfrom prophet import Prophet\n\n# Create a sample DataFrame with 'ds' (datetime) and 'y' (value) columns\ndata = {\n    'ds': pd.to_datetime(['2017-01-01', '2017-01-02', '2017-01-03', '2017-01-04', '2017-01-05',\n                          '2017-01-06', '2017-01-07', '2017-01-08', '2017-01-09', '2017-01-10']),\n    'y': [10, 12, 15, 13, 17, 18, 20, 22, 25, 23]\n}\ndf = pd.DataFrame(data)\n\n# Instantiate and fit the Prophet model\nmodel = Prophet()\nmodel.fit(df)\n\n# Create a future DataFrame for predictions (e.g., next 3 days)\nfuture = model.make_future_dataframe(periods=3)\n\n# Make predictions\nforecast = model.predict(future)\n\n# Print the last few rows of the forecast\nprint(forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail())","lang":"python","description":"This quickstart demonstrates how to create a simple Prophet model, fit it to a Pandas DataFrame, generate a future DataFrame, and make predictions. The input DataFrame must have columns named 'ds' (datetime) and 'y' (numerical value)."},"warnings":[{"fix":"Update your import statements from `from fbprophet import Prophet` to `from prophet import Prophet`. If you were using `pip install fbprophet`, switch to `pip install prophet`.","message":"The official package name changed from `fbprophet` to `prophet`. Projects still using `fbprophet` will encounter import errors and miss out on updates.","severity":"breaking","affected_versions":"<=1.0.1 (for `fbprophet`) vs >=1.0.0 (for `prophet`)"},{"fix":"Ensure a compatible C++ compiler is installed and accessible in your PATH. Refer to the `cmdstanpy` documentation for detailed installation instructions for your operating system (e.g., `https://mc-stan.org/cmdstanpy/installation.html`).","message":"Installation of `prophet` often requires a C++ compiler and specific environment setup due to its `cmdstanpy` dependency. Users on Windows or macOS might need to install development tools (e.g., Build Tools for Visual Studio, Xcode Command Line Tools).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Before passing your DataFrame to Prophet, ensure the 'ds' column is converted to timezone-naive datetimes. You can use `df['ds'] = df['ds'].dt.tz_localize(None)` to remove timezone information.","message":"Prophet expects the 'ds' column to contain naive (timezone-unaware) datetime objects, ideally in UTC. Providing timezone-aware datetimes can lead to unexpected behavior or errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install `prophet` in a clean virtual environment. If issues arise, try to `pip install \"pandas<2\"` or check the `prophet` documentation/changelog for explicitly supported `pandas` and `numpy` versions.","message":"Prophet has strict dependencies on specific versions of `pandas` and `numpy`. Version conflicts can cause runtime errors or unexpected behavior. While recent versions (1.3.0) aim to broaden compatibility, it remains a common issue.","severity":"gotcha","affected_versions":"All versions, historically more common in 0.x and 1.x before 1.3.0"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}