I want to display only filtered rows in the Excel output. Below is example,
df = pd.DataFrame({'Data': [1, 2, 3, 4,
5, 6, 7]})
writer = pd.ExcelWriter('pandasEx.xlsx',
engine ='xlsxwriter')
df.to_excel(writer, sheet_name ='Sheet1')
writer.save()
For output I want to hide all rows where 'Data' < 5
. How to do this?
It is equivalent to applying filter and saving the excel.
I know how to remove dups in pandas or filter in pandas. But I do not want to remove them in pandas, I simply want to apply filter in excel. The use case is that user will have full data in excel but certain rows will be hidden, if user wants they can unhide them in excel and look at data. Hope this explains use case
Thank you