Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Pandas Index Tutorial - loading data
import pandas as pd
import random
# read the data from the downloaded CSV file.
data = pd.read_csv('https://s3-eu-west-1.amazonaws.com/shanebucket/downloads/uk-500.csv')
# set a numeric id for use as an index for examples.
data['id'] = [random.randint(0,1000) for x in range(data.shape[0])]
data.head(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment