Last active
August 15, 2024 03:42
-
-
Save krishna1306/ddd0c9040f56b65fe62676a27bf41925 to your computer and use it in GitHub Desktop.
Getting started with Prophet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from prophet import Prophet | |
# Initialize the model | |
m = Prophet() | |
# you dataframe should have only two columns | |
# column1 - DateTime object | |
# column2 - value | |
df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv') | |
df.head() | |
# Fit the model to your data | |
m.fit(df) | |
# Create a dataframe for future predictions | |
future = m.make_future_dataframe(periods=365) | |
# Preview the future dataframe | |
future.tail() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment