reference dataframe by column index code example Example: pandas column by index DataFrame.iloc[:, n]