elukey edited a comment on issue #7006: World map viz not working in 
0.29rc7/0.31.0rc18
URL: 
https://github.com/apache/incubator-superset/issues/7006#issuecomment-476680851
 
 
   @mistercrunch would something like this work for you?
   
   ```
                # df[metric] will be a DataFrame
                # because there are duplicate column names
   -            ndf['m1'] = df[metric].iloc[:, 0]
   +            if isinstance(df[metric], pd.DataFrame):
   +                ndf['m1'] = df[metric].iloc[:, 0]
   +            else:
   +                ndf['m1'] = df[metric]
   ```
   
   Given what written in the comment I suppose that the original code was a 
workaround for a specific Pandas behavior, that seems to have changed. In 
theory the above code should be good for all pandas versions.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to