john-bodley commented on a change in pull request #9196: [Bug Fix] Returning
timeseries_limit_metric in table viz get_data
URL:
https://github.com/apache/incubator-superset/pull/9196#discussion_r384210912
##########
File path: superset/viz.py
##########
@@ -575,15 +575,29 @@ def get_data(self, df: pd.DataFrame) -> VizData:
the percent metrics have yet to be transformed.
"""
- if not self.should_be_timeseries() and DTTM_ALIAS in df:
- del df[DTTM_ALIAS]
-
+ non_percent_metric_columns = []
# Transform the data frame to adhere to the UI ordering of the columns
and
# metrics whilst simultaneously computing the percentages (via
normalization)
# for the percent metrics.
- non_percent_metric_columns = (
+
+ if not self.should_be_timeseries() and DTTM_ALIAS in df:
Review comment:
Maybe
```python
if DTTM_ALIAS in df:
if self.should_be_timeseries():
non_percent_metric_columns.append(DTTM_ALIAS)
else:
del df[DTTM_ALIAS]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]