Skip to content

Instantly share code, notes, and snippets.

@SaremS
Last active May 9, 2023 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaremS/510303feb5c1eef012ba7075930f4fba to your computer and use it in GitHub Desktop.
Save SaremS/510303feb5c1eef012ba7075930f4fba to your computer and use it in GitHub Desktop.
import pandas as pd
from neuralforecast.utils import AirPassengersDF
df = AirPassengersDF.iloc[:,1:]
df.columns = ["date","sales"]
df.index = pd.to_datetime(df["date"])
sales = df["sales"]
train = sales.iloc[:-36]
test = sales.iloc[-36:]
plt.figure(figsize = (16,8))
plt.plot(train,color="blue",label="Train")
plt.plot(test,color="red",label="Test")
plt.legend()
plt.margins(x=0)
plt.grid(alpha=0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment