You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/03/26 15:10:26 UTC

[GitHub] [incubator-superset] elukey edited a comment on issue #7006: World map viz not working in 0.29rc7/0.31.0rc18

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


With regards,
Apache Git Services

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