Created
November 8, 2018 09:09
-
-
Save RandomForestGump/89b27cf6f22243b2ab9f944b888b6e96 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"1999-01-01 145\n", | |
"1999-01-02 145\n", | |
"1999-01-03 145\n", | |
"1999-01-04 145\n", | |
"1999-01-05 145\n", | |
"Freq: D, Name: y, dtype: int64" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np\n", | |
"import calendar\n", | |
"import datetime\n", | |
"import seaborn as sns\n", | |
"import os\n", | |
"os.chdir(\"C:/Users/oyo/Desktop\")\n", | |
"import seaborn\n", | |
"import matplotlib.pyplot as plt\n", | |
"from fbprophet import Prophet\n", | |
"import numpy as np\n", | |
"from statsmodels.graphics.tsaplots import plot_acf,plot_pacf\n", | |
"% matplotlib inline\n", | |
"\n", | |
"df=pd.read_csv('Discharge Article/Discharge_processed.csv')\n", | |
"df.columns=['ds','y']\n", | |
" \n", | |
"df.set_index('ds',inplace=True)\n", | |
"ts = pd.Series(df['y'], index=pd.date_range(start=\"1999-01-01\", end=\"2018-07-31\"))\n", | |
"ts.head(5)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"2018-07-27 1180\n", | |
"2018-07-28 1524\n", | |
"2018-07-29 1226\n", | |
"2018-07-30 997\n", | |
"2018-07-31 851\n", | |
"Freq: D, Name: y, dtype: int64" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ts.tail(5)" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment