access nth column pandas code example Example: dataframe look at every second column df[df.columns[::n]]