I have this line of code that works. price = df1.loc[:, ['price', 'date']] I need to emulate this is as a loop with other metrics like sales and revenue. Is this possible? i.e How do I get Python to reference a word in the list both with and without quotation marks? listx = [price,sales, revenue] for a in listx: a = df1.loc[:, ['a', 'date']] Continue reading...