Antonio-RiveroMartnez commented on code in PR #23155:
URL: https://github.com/apache/superset/pull/23155#discussion_r1491270037
##########
tests/integration_tests/fixtures/trends.csv:
##########
Review Comment:
Shouldn't this file have some content?
##########
superset/commands/report/execute.py:
##########
@@ -254,6 +255,14 @@ def _get_csv_data(self) -> bytes:
try:
logger.info("Getting chart from %s as user %s", url, user.username)
csv_data = get_chart_csv_data(chart_url=url,
auth_cookies=auth_cookies)
+ if csv_data:
+ buf = BytesIO()
+ temp_df = pd.read_csv(StringIO(csv_data.decode("utf-8")))
+ if temp_df.columns[0].strip() == "Unnamed: 0":
Review Comment:
Why `Unnamed: 0`? Can we move it out of the function and make it clear why
is that the value we're comparing? Are we certain that no matter what the CVS
file is, this is the value it gets with numbered columns?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]