You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order not to see the indexes you have to activate the “Row index” option and then deactivate it again. The code looks like this: sqlQuery2.to_excel(“output/summary.xls”, engine='xlsxwriter', header=True, index=False).
The “index=False” option should be included by default in the original code.
Greetings
The text was updated successfully, but these errors were encountered:
Hi @bernabeudario, that was decided by design because most of the time you don't want the index to be added as a column automatically when creating a CSV or excel file. Now, I think we should have the option to control that though, but I would probably keep it as False by default. Does it make sense?
I agree with you that it should be “False” by default. The issue is that currently, since it is not indicated in the code, it defaults to “True” (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_excel.html).
By default Amphi generates this code: sqlQuery2.to_excel(“output/summary.xls”, engine='xlsxwriter', header=True).
If you notice “index” is not included. So Pandas will use the value “True”.
Because of that, to not show the indexes Amphi should indicate “index:False” by default: sqlQuery2.to_excel(“output/summary.xls”, engine='xlsxwriter', header=True, index=False).
Hi,
When adding the Step “Excel File Output” the option “Row index” is shown as disabled or “False” (indicating that indexes will not be shown).
The code it generates is something like:
sqlQuery2.to_excel(“output/summary.xls”, engine='xlsxwriter', header=True)
By default “.to_excel” has the value “index=True” (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_excel.html) so in the resulting Excel you will see the indexes.
In order not to see the indexes you have to activate the “Row index” option and then deactivate it again. The code looks like this:
sqlQuery2.to_excel(“output/summary.xls”, engine='xlsxwriter', header=True, index=False).
The “index=False” option should be included by default in the original code.
Greetings
The text was updated successfully, but these errors were encountered: