df.index
df.columns
| Operation | Syntax | Result |
|---|---|---|
| Select column | df[‘col’] | Series |
| Select Row by lable | df.loc[label] | Series |
| Select Row by index location | df.iloc[loc] | Series |
| Select Slice rows | df[5:11] | DataFramework |
| Select Rows by boolean vector | df[bool_vec] | DataFramework |
df[‘col_name’]
loc is label-based, which means that you have to specify rows and columns based on their row and column labels. iloc is integer index based, so you have to specify rows and columns by their integer index like you did in the previous exercise.

