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/
This file contains 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 | |
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