-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Show full long number in text email report for table chart. #19575
fix: Show full long number in text email report for table chart. #19575
Conversation
superset/utils/csv.py
Outdated
@@ -95,6 +98,9 @@ def get_chart_dataframe( | |||
return None | |||
|
|||
result = simplejson.loads(content.decode("utf-8")) | |||
pd.set_option( | |||
"display.float_format", lambda x: str(x) | |||
) # need to convert float value to string to show full long number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the comment above the line:
# comm
pd.set_option...
Codecov Report
@@ Coverage Diff @@
## master #19575 +/- ##
=======================================
Coverage 66.54% 66.54%
=======================================
Files 1692 1692
Lines 64775 64804 +29
Branches 6661 6661
=======================================
+ Hits 43103 43125 +22
- Misses 19972 19979 +7
Partials 1700 1700
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Approving (and re-starting CI... sigh). Heads up to @eschutho in case you have any additional feelings here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
…che#19575) * fix lint issue * resolve comment * fix pipeline broken issue * resolve pipeline broken issue
…che#19575) * fix lint issue * resolve comment * fix pipeline broken issue * resolve pipeline broken issue
SUMMARY
Before this update, when we have long number in text email report for table chart, report was not showing correct value.
It was because
pd
converts long float value intoe
type.In this pr, we added some display viz option into
pd
, so all long float value are displayed as a string.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
AFTER:
TESTING INSTRUCTIONS
Check the email.
ADDITIONAL INFORMATION