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