jhettler commented on issue #5792: Export from dashboard to CSV contains verbose names URL: https://github.com/apache/incubator-superset/issues/5792#issuecomment-423951097 We have figured it out by adding header to pandas dataframe to_csv function `return df.to_csv(index=include_index, header=["test1","test2"], **config.get('CSV_EXPORT'))` in https://github.com/apache/incubator-superset/blob/6b89b7f8b522e7226f3f5a61ed7f29b3e7d9013a/superset/viz.py#L486 you can find verbose_names in `self.datasource.data.verbose_map` object ` {'__timestamp': 'Time', 'sum__num': 'Suma čehosi', 'avg__num': 'avg__num', 'sum__sum_boys': 'sum__sum_boys', 'avg__sum_boys': 'avg__sum_boys', 'sum__sum_girls': 'sum__sum_girls', 'avg__sum_girls': 'avg__sum_girls', 'count': 'COUNT(*)', 'ds': 'ds', 'gender': 'gender', 'name': 'Jméno', 'num': 'num', 'state': 'state', 'sum_boys': 'sum_boys', 'sum_girls': 'sum_girls', 'num_california': 'num_california'} ` and exported columns in `self.results.df.columns` `Index(['name', 'sum__num'], dtype='object')`
---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
