File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -118,13 +118,13 @@ def generate_scenario(start_date_str,
118118 if countries :
119119 ips_df = ips_df [ips_df .CountryName .isin (countries )]
120120
121+ # Use a value instead of NaN for missing RegionName.
122+ ips_df ['RegionName' ] = ips_df ['RegionName' ].fillna ("" )
123+
121124 # Fill any missing "supposedly known" NPIs by assuming they are the same as previous day, or 0 if none is available
122125 for npi_col in npi_columns :
123126 ips_df .update (ips_df .groupby (['CountryName' , 'RegionName' ], group_keys = False )[npi_col ].ffill ().fillna (0 ))
124127
125- # Use a value instead of NaN for missing RegionName.
126- ips_df ['RegionName' ] = ips_df ['RegionName' ].fillna ("" )
127-
128128 if scenario == "Historical" :
129129 return ips_df
130130
You can’t perform that action at this time.
0 commit comments