change pandas warning settings

parent f8ade528
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"%matplotlib inline\n", "%matplotlib inline\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import pandas as pd\n", "import pandas as pd\n",
"pd.options.mode.chained_assignment = None # default='warn'\n",
"import isoweek\n", "import isoweek\n",
"import os\n", "import os\n",
"import numpy as np" "import numpy as np"
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -945,7 +946,7 @@ ...@@ -945,7 +946,7 @@
"[2590 rows x 9 columns]" "[2590 rows x 9 columns]"
] ]
}, },
"execution_count": 4, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -964,7 +965,7 @@ ...@@ -964,7 +965,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1010,7 +1011,7 @@ ...@@ -1010,7 +1011,7 @@
"Index: []" "Index: []"
] ]
}, },
"execution_count": 5, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1021,7 +1022,7 @@ ...@@ -1021,7 +1022,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1319,7 +1320,7 @@ ...@@ -1319,7 +1320,7 @@
"1782 -999.99 " "1782 -999.99 "
] ]
}, },
"execution_count": 6, "execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1330,8 +1331,10 @@ ...@@ -1330,8 +1331,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 8,
"metadata": {}, "metadata": {
"scrolled": true
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -2233,7 +2236,7 @@ ...@@ -2233,7 +2236,7 @@
"[2572 rows x 9 columns]" "[2572 rows x 9 columns]"
] ]
}, },
"execution_count": 7, "execution_count": 8,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -2252,8 +2255,10 @@ ...@@ -2252,8 +2255,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 9,
"metadata": {}, "metadata": {
"collapsed": true
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -2322,7 +2327,7 @@ ...@@ -2322,7 +2327,7 @@
"Length: 2572, dtype: datetime64[ns]" "Length: 2572, dtype: datetime64[ns]"
] ]
}, },
"execution_count": 8, "execution_count": 9,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -2341,7 +2346,7 @@ ...@@ -2341,7 +2346,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -2369,16 +2374,24 @@ ...@@ -2369,16 +2374,24 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 43, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.6/site-packages/pandas/plotting/_core.py:1716: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access\n",
" series.name = label\n"
]
},
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fa136e85128>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f46fee79d30>"
] ]
}, },
"execution_count": 43, "execution_count": 11,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
}, },
...@@ -2408,7 +2421,7 @@ ...@@ -2408,7 +2421,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -2418,21 +2431,11 @@ ...@@ -2418,21 +2431,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": 13,
"metadata": {}, "metadata": {
"outputs": [ "scrolled": true
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" \"\"\"Entry point for launching an IPython kernel.\n"
]
}, },
"outputs": [
{ {
"data": { "data": {
"text/html": [ "text/html": [
...@@ -3395,7 +3398,7 @@ ...@@ -3395,7 +3398,7 @@
"[2572 rows x 10 columns]" "[2572 rows x 10 columns]"
] ]
}, },
"execution_count": 12, "execution_count": 13,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -3407,10 +3410,8 @@ ...@@ -3407,10 +3410,8 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 14,
"metadata": { "metadata": {},
"collapsed": true
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -3740,7 +3741,7 @@ ...@@ -3740,7 +3741,7 @@
"48 2022.0 418.514615" "48 2022.0 418.514615"
] ]
}, },
"execution_count": 15, "execution_count": 14,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -3757,30 +3758,13 @@ ...@@ -3757,30 +3758,13 @@
"yearly_avg" "yearly_avg"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"TODO: add yearly average to original dataframe, rescale yeartime to weeks (52)"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": 15,
"metadata": {}, "metadata": {
"outputs": [ "collapsed": true
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" \"\"\"Entry point for launching an IPython kernel.\n"
]
}, },
"outputs": [
{ {
"data": { "data": {
"text/html": [ "text/html": [
...@@ -4867,7 +4851,7 @@ ...@@ -4867,7 +4851,7 @@
"[2572 rows x 12 columns]" "[2572 rows x 12 columns]"
] ]
}, },
"execution_count": 17, "execution_count": 15,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -4880,16 +4864,16 @@ ...@@ -4880,16 +4864,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fa13c078d30>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f46f8d2ff28>"
] ]
}, },
"execution_count": 36, "execution_count": 16,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment