Get startedGet started for free

.sheet_names attribute

While our previous sales files contained all information in the initial reading of the file, we'll have to dig a little deeper when dealing with a whole workbook.

The theater_report.xlsx workbook contains a few helpful tabs for you to create your report. Can you get the names of these tabs?

Once again, pandas has already been loaded for you as pd

This exercise is part of the course

Python for Spreadsheet Users

View Course

Exercise instructions

  • Use the .sheet_names attribute to get the sheet names of theater_report and assign the result to theater_sheets.
  • Print the sheet names.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Read in the whole workbook
theater_report = pd.ExcelFile('theater_report.xlsx')

# Get sheet names


# Print sheet names
Edit and Run Code