1. 学习
  2. /
  3. 课程
  4. /
  5. Python for Spreadsheet Users

Connected

练习

Loading data

The pandas package, which you now know how to import as pd, has a useful function, read_excel(), that will load in our Excel data.

The ticket_sales.xlsx file contains data relating to ticket sales for several (fake and punny) movies at a few different theater locations. Maybe they're your theaters.

Let's get this data into Python so you can start looking at movie and location performance.

说明 1 / 共 2 个

undefined XP
  • 1

    Import the pandas package as pd and use the read_excel() function to load the data from ticket_sales.xlsx.

  • 2

    Assign the data to the variable sales.