Skip to content

Commit

Permalink
Mask no longer assings Null values to False
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklise committed Jul 29, 2020
1 parent 66f9120 commit 78dc091
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pecos/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def mask(self):
logger.info("Empty database")
return

mask = ~pd.isnull(self.df) # False if NaN
mask = pd.DataFrame(True, index=self.df.index, columns=self.df.columns)
for i in self.test_results.index:
variable = self.test_results.loc[i, 'Variable Name']
start_date = self.test_results.loc[i, 'Start Time']
Expand All @@ -78,7 +78,9 @@ def mask(self):
mask.loc[start_date:end_date,variable] = False
except:
pass

elif self.test_results.loc[i, 'Error Flag'] == 'Missing timestamp':
mask.loc[start_date:end_date,:] = False

return mask

@property
Expand Down

0 comments on commit 78dc091

Please sign in to comment.