From 136139abab94112e5dc3d1791ed8dbb22032230e Mon Sep 17 00:00:00 2001 From: Kalyan Kanuri Date: Wed, 27 Jul 2016 06:24:46 -0700 Subject: [PATCH] showing NULL --- caravel/models.py | 4 ++-- caravel/viz.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/caravel/models.py b/caravel/models.py index 008a3f0d820b7..4d41716c1311f 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -1410,8 +1410,8 @@ def get_filters(raw_filters): fields.append(Dimension(col) == s) cond = Filter(type="or", fields=fields) else: - #allows setting filter to query that value of dimension is null - if eq == 'null' or eq == 'NULL': + #allows setting filter to query that value of dimension is NULL + if eq == 'NULL': eq = None cond = Dimension(col) == eq if op == 'not in': diff --git a/caravel/viz.py b/caravel/viz.py index 3259280adb9ea..28ef014d6d829 100755 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -177,7 +177,7 @@ def get_df(self, query_obj=None): if self.datasource.offset: df.timestamp += timedelta(hours=self.datasource.offset) df.replace([np.inf, -np.inf], np.nan) - df = df.fillna(0) + df = df.fillna('NULL') return df @property