python - how to repeat row labels in pandas pivot table function and ... how to repeat row labels in pandas pivot table function and export it as excel. Ask Question Asked 1 year, 4 months ago. Modified 8 months ago. Viewed 2k times ... Adding the data.reset_index().to_excel('file.xlsx', index=False) after finishing the table actually worked.