xrmx commented on a change in pull request #4394: Implement the column config 
and row config in pivot table
URL: 
https://github.com/apache/incubator-superset/pull/4394#discussion_r167797482
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -584,8 +584,12 @@ def get_data(self, df):
         # Display metrics side by side with each column
         if self.form_data.get('combine_metric'):
             df = df.stack(0).unstack()
+        parsed_columns = list(map(
 
 Review comment:
   Not sure if this code is needed / wanted but maps in python are a bit 
convoluted. What about using list comprehension?
   
   ```
   to_list = lambda x: [six.text_type(z) for z in x] if isinstance(x, tuple) 
else [x]
   parsed_columns = [to_list(x) for x in df.columns.values]
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to