Skipping Rows When Importing an Excel Sheet with Pandas

Python
Import and Export

 1|  import pandas as pd
 2|  
 3|  # skip the first 5 rows
 4|  df = pd.read_excel('Returns.xlsx', sheet_name='Returns', skiprows=4)
 5|  
 6|  # skip the 1st and 3rd rows
 7|  df = pd.read_excel('Returns.xlsx', sheet_name='Returns', skiprows=[0,2])
1 Upvote
Tags: Read_excel | Excel
Did you find this snippet useful?

Sign up to bookmark this in your snippet library