Python Forum
[Solved] df.to_excel: certain rows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] df.to_excel: certain rows
#3
(May-26-2021, 06:21 AM)perfringo Wrote: One way is to feed .to_excel with filtered dataframe. For first three rows it would be:

df.iloc[:3].to_excel(writer, startrow=1, sheet_name='row_1_to_3')  

Thank you!
Reply


Messages In This Thread
RE: df.to_excel: certain rows - by perfringo - May-26-2021, 06:21 AM
RE: df.to_excel: certain rows - by ju21878436312 - Jun-15-2021, 09:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas .to_excel() Dropping First Row of Data When Run from Anaconda Prompt kazoli 0 2,344 Mar-15-2018, 04:52 PM
Last Post: kazoli

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020