Select multiple sheets
So far, you've read Excel files one sheet at a time, which lets you customize import arguments for each sheet. But if an Excel file has some sheets that you want loaded with the same parameters, you can get them in one go by passing a list of their names or indices to read_excel()
's sheet_name
keyword. To get them all, pass None
. You'll practice both methods to get data from fcc_survey.xlsx
, which has multiple sheets of similarly-formatted data.
pandas
has been loaded as pd
.
Este ejercicio forma parte del curso
Streamlined Data Ingestion with pandas
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Load both the 2016 and 2017 sheets by name
all_survey_data = pd.read_excel("fcc_survey.xlsx",
____)
# View the data type of all_survey_data
print(type(all_survey_data))