change pandas warning settings

parent f8ade528
......@@ -2,13 +2,14 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"pd.options.mode.chained_assignment = None # default='warn'\n",
"import isoweek\n",
"import os\n",
"import numpy as np"
......@@ -23,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -42,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
......@@ -945,7 +946,7 @@
"[2590 rows x 9 columns]"
]
},
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
......@@ -964,7 +965,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -1010,7 +1011,7 @@
"Index: []"
]
},
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
......@@ -1021,7 +1022,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
......@@ -1319,7 +1320,7 @@
"1782 -999.99 "
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
......@@ -1330,8 +1331,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"execution_count": 8,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
......@@ -2233,7 +2236,7 @@
"[2572 rows x 9 columns]"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2252,8 +2255,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"execution_count": 9,
"metadata": {
"collapsed": true
},
"outputs": [
{
"data": {
......@@ -2322,7 +2327,7 @@
"Length: 2572, dtype: datetime64[ns]"
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2341,7 +2346,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -2369,16 +2374,24 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 11,
"metadata": {},
"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": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fa136e85128>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f46fee79d30>"
]
},
"execution_count": 43,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2408,7 +2421,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
......@@ -2418,21 +2431,11 @@
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"execution_count": 13,
"metadata": {
"scrolled": true
},
"outputs": [
{
"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"
]
},
{
"data": {
"text/html": [
......@@ -3395,7 +3398,7 @@
"[2572 rows x 10 columns]"
]
},
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
......@@ -3407,10 +3410,8 @@
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": true
},
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
......@@ -3740,7 +3741,7 @@
"48 2022.0 418.514615"
]
},
"execution_count": 15,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
......@@ -3757,30 +3758,13 @@
"yearly_avg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"TODO: add yearly average to original dataframe, rescale yeartime to weeks (52)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"execution_count": 15,
"metadata": {
"collapsed": true
},
"outputs": [
{
"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"
]
},
{
"data": {
"text/html": [
......@@ -4867,7 +4851,7 @@
"[2572 rows x 12 columns]"
]
},
"execution_count": 17,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
......@@ -4880,16 +4864,16 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fa13c078d30>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f46f8d2ff28>"
]
},
"execution_count": 36,
"execution_count": 16,
"metadata": {},
"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