You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2024/07/18 06:29:22 UTC
(superset) branch hungary updated: updating syntax to address pandas warnings in notebook
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch hungary
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/hungary by this push:
new e47506c575 updating syntax to address pandas warnings in notebook
e47506c575 is described below
commit e47506c57598064d8493d36bdfc9247f08a6b281
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Thu Jul 18 00:29:09 2024 -0600
updating syntax to address pandas warnings in notebook
---
.../scripts/Country Map GeoJSON Generator.ipynb | 58 ++++------------------
1 file changed, 9 insertions(+), 49 deletions(-)
diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/scripts/Country Map GeoJSON Generator.ipynb b/superset-frontend/plugins/legacy-plugin-chart-country-map/scripts/Country Map GeoJSON Generator.ipynb
index cdf24593aa..ba52223d2b 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-country-map/scripts/Country Map GeoJSON Generator.ipynb
+++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/scripts/Country Map GeoJSON Generator.ipynb
@@ -44,15 +44,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "Matplotlib is building the font cache; this may take a moment.\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"# Dependencies\n",
"\n",
@@ -2509,25 +2501,12 @@
"cell_type": "code",
"execution_count": 49,
"metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/var/folders/qb/g_y12hgx11q6zfl1y75kmn2c0000gn/T/ipykernel_17310/784227429.py:1: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.\n",
- "The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.\n",
- "\n",
- "For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.\n",
- "\n",
- "\n",
- " philippines_regions['name'].replace({'Dinagat Islands (Region XIII)': 'Caraga Administrative Region (Region XIII)',\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "philippines_regions['name'].replace({'Dinagat Islands (Region XIII)': 'Caraga Administrative Region (Region XIII)', \n",
- " 'Autonomous Region in Muslim Mindanao (ARMM)': 'Bangsamoro Autonomous Region in Muslim Mindanao (BARMM)'}, \n",
- " inplace=True)"
+ "philippines_regions['name'] = philippines_regions['name'].replace({\n",
+ " 'Dinagat Islands (Region XIII)': 'Caraga Administrative Region (Region XIII)',\n",
+ " 'Autonomous Region in Muslim Mindanao (ARMM)': 'Bangsamoro Autonomous Region in Muslim Mindanao (BARMM)'\n",
+ "})"
]
},
{
@@ -2948,7 +2927,7 @@
},
{
"cell_type": "code",
- "execution_count": 54,
+ "execution_count": null,
"metadata": {
"id": "tM1F5d0Vt1LW",
"outputId": "75abad9b-9442-4279-d66d-a0cd5fb97198"
@@ -2960,16 +2939,6 @@
"text": [
"Debug Info: figsize=(30, 165), ncols=6, nrows=33, num_countries=194\n"
]
- },
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAC4YAAEBACAYAAAC44v0FAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/TGe4hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd1hTZ/sH8G/C3rIFQXChCC7cdeGq2mrd2wpVq9W+tdXWvavWulfraLWuWlfrqrZ9rdu6t6hgXQgqguydBHJ+f/jzvISZQEICfD/XxdU8yTPuk9icnOfc5zkSQRAEEBEREREREREREREREREREREREREREVGZJdV3AERERERERERERERERERERERERERERERUMkwMJyIiIiIiIiIiIiIiIiIiIiIiIiIiIirjmBhOREREREREREREREREREREREREREREVMYxMZyIiIiIiIiIiIiIiIiIiIiIiIiI [...]
- "text/plain": [
- "<Figure size 3000x16500 with 194 Axes>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
}
],
"source": [
@@ -2987,18 +2956,9 @@
},
{
"cell_type": "code",
- "execution_count": 55,
+ "execution_count": null,
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "TypeScript code written to src/countries.ts\n",
- "JSON written to docs/data/countries.json\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"\n",
"\n",