chuancyzhang opened a new issue #10373: URL: https://github.com/apache/incubator-superset/issues/10373
when some datasource column is null, Pivot Table can't display Null value. ### Expected results  ### Actual results  #### Screenshots If applicable, add screenshots to help explain your problem. #### How to reproduce the bug 1. Go to Chart 2. Click on Pivot Table 3. Scroll down to some Null Value in datasource 4. See error ### Environment (please complete the following information): - superset version: 0.36.0 - python version: 3.6.6 - node.js version: `node -v` - npm version: `npm -v` ### Checklist Make sure these boxes are checked before submitting your issue - thank you! - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [ ] I have reproduced the issue with at least the latest released version of superset. - [ ] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context Finally, I find the bug that is DataFrame in PivotTableViz Class not fill Null. pandas will throw away nulls when grouping/pivoting, so i substitute NULL_STRING for any nulls in the necessary columns. ``` df = df.fillna(value=NULL_STRING).pivot_table( index=groupby, columns=columns, values=metrics, aggfunc=aggfunc, margins=self.form_data.get("pivot_margins"), ) ``` ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
