Skip to content

Commit 4c203c6

Browse files
committed
Filter out entire entries with a lat/lon of 0.
1 parent 59af0e5 commit 4c203c6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

data_cleaning.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ def clean_data(data):
88
if "significant_height" in data.columns:
99
data.loc[data["significant_height"] >= 9999, "significant_height"] = None
1010

11+
if "latitude" in data.columns and "longitude" in data.columns:
12+
# Drop rows where both latitude and longitude are 0
13+
data = data.loc[~((data["latitude"] == 0) & (data["longitude"] == 0))]
14+
1115
return data

0 commit comments

Comments
 (0)