mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: Show full long number in text email report for table chart. (#19575)
* fix lint issue * resolve comment * fix pipeline broken issue * resolve pipeline broken issue
This commit is contained in:
parent
5a3031d35f
commit
4dc19345d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user