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:
Smart-Codi 2022-04-22 16:55:00 -04:00 committed by GitHub
parent 5a3031d35f
commit 4dc19345d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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