Skip to content

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('')
# set a numeric id for use as an index for examples.
data['id'] = [random.randint(0,1000) for x in range(data.shape[0])]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment