Problem 4: Load an Excel File and Select a Specific Sheet
Easypython
Problem Description
Write a Python program that loads a specific sheet from a multi-sheet Excel file and prints its shape and first 3 rows.
Input
An Excel file path and a sheet name.
Output
The shape and first 3 rows of the specified sheet.
Constraints
- The specified sheet name must exist in the Excel file.
Example Input
text"company_data.xlsx", sheet_name="Employees"
Example Output
textShape: (50, 6) (first 3 rows displayed)
Concepts Covered
pd.read_excel(), the sheet_name parameter.