Title: Load An Excel File Into Pandas
Slug: load_excel_file_into_pandas
Summary: How to quickly load an Excel file into pandas.
Date: 2016-08-31 12:00
Category: Python
Tags: Basics
Authors: Chris Albon
In [6]:
# Load library
import pandas as pd
In [7]:
# Create URL to Excel file (alternatively this can be a filepath)
url = 'https://raw.githubusercontent.com/chrisalbon/simulated_datasets/master/data.xlsx'
# Load the first sheet of the Excel file into a data frame
df = pd.read_excel(url, sheetname=0, header=1)
# View the first ten rows
df.head(10)
Out[7]: