Skip to content

Commit

Permalink
fix: Show full long number in text email report for table chart. (apa…
Browse files Browse the repository at this point in the history
…che#19575)

* fix lint issue

* resolve comment

* fix pipeline broken issue

* resolve pipeline broken issue
  • Loading branch information
codemaster08240328 authored and philipher29 committed Jun 9, 2022
1 parent 3f27c39 commit a12b969
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions superset/utils/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,16 @@ def get_chart_csv_data(
def get_chart_dataframe(
chart_url: str, auth_cookies: Optional[Dict[str, str]] = None
) -> Optional[pd.DataFrame]:
# Disable all the unnecessary-lambda violations in this function
# pylint: disable=unnecessary-lambda
content = get_chart_csv_data(chart_url, auth_cookies)
if content is None:
return None

result = simplejson.loads(content.decode("utf-8"))

# need to convert float value to string to show full long number
pd.set_option("display.float_format", lambda x: str(x))
df = pd.DataFrame.from_dict(result["result"][0]["data"])

# rebuild hierarchical columns and index
Expand Down

0 comments on commit a12b969

Please sign in to comment.