Skip to content

Commit 5f67c3e

Browse files
committed
Fix to drop duplicate zones
1 parent c5d60a2 commit 5f67c3e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

notebook/nyctaxi.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
"zones[\"latitude\"] = zones.centroid.to_crs(epsg=4326).x\n",
108108
"zones[\"longitude\"] = zones.centroid.to_crs(epsg=4326).y\n",
109109
"\n",
110+
"# Drop duplicate by location ID keeping the first\n",
111+
"zones = zones.drop_duplicates(subset=\"LocationID\", keep=\"first\")\n",
110112
"# Drop cols we don't need and inspect results\n",
111113
"zones = zones.set_index(\"LocationID\").drop(\n",
112114
" [\"OBJECTID\", \"Shape_Leng\", \"Shape_Area\"], axis=1\n",

0 commit comments

Comments
 (0)