pandas change columns order using loc or iloc code example
Example 1: pandas iloc select certain columns
dataframe.iloc[:,[1,2]]
Example 2: how to use loc and iloc in pandas
>>> df.iloc[0, 1]
2
dataframe.iloc[:,[1,2]]
>>> df.iloc[0, 1]
2