Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This gist is for an example code found in the blog post on how to use loc and iloc https://www.marsja.se/how-to-use-iloc-and-loc-for-indexing-and-slicing-pandas-dataframes/
import pandas as pd
data = 'https://vincentarelbundock.github.io/Rdatasets/csv/DAAG/nasshead.csv'
df = pd.read_csv(data, index_col=1)
df.loc['case']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.