Exporting a pandas dataframe with more than 2 million rows to Excel

Viewed 47

I am trying to export a dataframe with more than 2 million rows into Excel. But since Excel's maximum limit is ~1mil rows. All of the data doesn't go through. Is there any way of doing it? Thanks in advance.

new1.to_csv( "combined.csv", index=False, encoding='utf-8-sig') enter image description here

1 Answers

I don't think there's a way to exceed that limit, as Vlad pointed out, that's a limitation of Excel.

What I think you could do, if that's an option, is writing the data to the same file, different sheets. An example is shown in this answer.

Related