rohitpawar2811 commented on code in PR #23155:
URL: https://github.com/apache/superset/pull/23155#discussion_r1492055274
##########
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:
>> Are we certain that no matter what the CVS file is, this is the value it
gets with numbered columns?
Yes I am sure about, and not able to find a better way to check that index
column is present in csv or not
--
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]