From fbc7393154d55e19b6e2b2acebaedde1fb08cbc3 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 7 Aug 2023 12:02:09 -0600 Subject: [PATCH] per #2294, remove rows that have any null/NaN values to prevent failure trying to process corrupted data --- .../read_ascii_storm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parm/use_cases/model_applications/short_range/Point2Grid_obsLSR_ObsOnly_PracticallyPerfect/read_ascii_storm.py b/parm/use_cases/model_applications/short_range/Point2Grid_obsLSR_ObsOnly_PracticallyPerfect/read_ascii_storm.py index 1340e3b274..9588eb2efe 100644 --- a/parm/use_cases/model_applications/short_range/Point2Grid_obsLSR_ObsOnly_PracticallyPerfect/read_ascii_storm.py +++ b/parm/use_cases/model_applications/short_range/Point2Grid_obsLSR_ObsOnly_PracticallyPerfect/read_ascii_storm.py @@ -46,6 +46,9 @@ #Allows for concatenating storm reports together temp_data = temp_data[temp_data["Time"] != "Time"] +# strip out any rows that have any null/NaN values +temp_data = temp_data[~temp_data.isnull().any(axis=1)] + #Change some columns to floats and ints temp_data[["Lat","Lon"]] = temp_data[["Lat","Lon"]].apply(pd.to_numeric)