handling chained_assignment correctly
This commit is contained in:
@@ -11,7 +11,8 @@
|
|||||||
"from urllib import request\n",
|
"from urllib import request\n",
|
||||||
"\n",
|
"\n",
|
||||||
"pd.set_option('display.max_rows', 100)\n",
|
"pd.set_option('display.max_rows', 100)\n",
|
||||||
"pd.set_option('display.max_columns', None)"
|
"pd.set_option('display.max_columns', None)\n",
|
||||||
|
"pd.set_option('mode.chained_assignment', 'raise')"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -357,7 +358,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def _intensiveCareBeds2Dict(intensiveCareBeds):\n",
|
"def _intensiveCareBeds2Dict(intensiveCareBeds):\n",
|
||||||
" df = intensiveCareBeds[['date', 'betten_belegt', 'betten_frei']]\n",
|
" df = intensiveCareBeds[['date', 'betten_belegt', 'betten_frei']].copy()\n",
|
||||||
" df['date'] = df['date'].dt.strftime('%Y-%m-%d')\n",
|
" df['date'] = df['date'].dt.strftime('%Y-%m-%d')\n",
|
||||||
" return df.to_dict(orient = \"records\")\n",
|
" return df.to_dict(orient = \"records\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user