Import an Excel Sheet Using Pandas

Python

To read an Excel sheet into a Pandas dataframe we use the read_excel function and pass the sheet name of the sheet to the sheet_name parameter.

In the example below we are importing the ReturnsData sheet from the Returns excel file into the dataframe named df.

 1|  import pandas as pd
 2|  
 3|  df = pd.read_excel('Returns.xlsx', sheet_name='ReturnsData')
Did you find this snippet useful?

Sign up for free to to add this to your code library