Created
August 26, 2020 05:34
-
-
Save sid321axn/bf417840d7d22da4cbf2aa641637d25c to your computer and use it in GitHub Desktop.
This file contains 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
#setting the split date | |
split_date = pd.Timestamp('26-08-2018') | |
# creating training dataframe | |
train = df.loc[:split_date] | |
# creating test dataframe | |
test = df.loc[split_date:] | |
#plotting train test dataframe as aline plot | |
ax = train.plot(kind='line',figsize=(12,8)) | |
test.plot(ax=ax,kind='line',figsize=(12,8)) | |
plt.legend(['train', 'test']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment