Last active
November 10, 2020 01:31
-
-
Save shanealynn/3324456b1a22eae86fce40bdd744f102 to your computer and use it in GitHub Desktop.
Pandas Index Tutorial - loading data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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