Skip to content

Instantly share code, notes, and snippets.

@RandomForestGump
Created November 8, 2018 09:12
Show Gist options
  • Save RandomForestGump/cf8c4a857bd4f47e0d12459927d2d9df to your computer and use it in GitHub Desktop.
Save RandomForestGump/cf8c4a857bd4f47e0d12459927d2d9df to your computer and use it in GitHub Desktop.
{
"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",
"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
}
Display the source blob
Display the rendered blob
Raw
{
"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",
"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