Selecting Columns from a Pandas Dataframe Using Loc and iLoc
Python
Source: https://www.analyseup.com/python-data-science-reference/pandas-selecting-dropping-and-renaming-columns.html
1| #Selects columns between 'Order_No' and 'ProductID' 2| 3| df.loc[:,'Order_No':'ProductID'] 4| 5| #Select first 5 columns 6| 7| df.iloc[:,0:5]
133
121
117
109