Command
df.ilocExplanation
df.iloc[] is integer-location-based indexing to select rows and columns.
Examples
Select first row
df.iloc[0]Select first row, second column
df.iloc[0, 1]Select first two columns
df.iloc[:, 0:2]df.ilocdf.iloc[] is integer-location-based indexing to select rows and columns.
Select first row
df.iloc[0]Select first row, second column
df.iloc[0, 1]Select first two columns
df.iloc[:, 0:2]