mistercrunch commented on a change in pull request #4726: [bugfix] convert
metrics to numeric in dataframe
URL:
https://github.com/apache/incubator-superset/pull/4726#discussion_r178484808
##########
File path: superset/viz.py
##########
@@ -170,11 +170,21 @@ def get_df(self, query_obj=None):
if self.datasource.offset:
df[DTTM_ALIAS] += timedelta(hours=self.datasource.offset)
df[DTTM_ALIAS] += self.time_shift
+
+ self.df_metrics_to_num(df, query_obj.get('metrics') or [])
Review comment:
This way is a bit safer if the key exists with a `None` value it will make
it an empty dict. That situation shouldn't occur, but it's a tiny bit safer.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services