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
# Single selections using iloc and DataFrame | |
# Rows: | |
data.iloc[0] # first row of data frame (Aleshia Tomkiewicz) - Note a Series data type output. | |
data.iloc[1] # second row of data frame (Evan Zigomalas) | |
data.iloc[-1] # last row of data frame (Mi Richan) | |
# Columns: | |
data.iloc[:,0] # first column of data frame (first_name) | |
data.iloc[:,1] # second column of data frame (last_name) | |
data.iloc[:,-1] # last column of data frame (id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment