I have problems converting the variable into a string. It doesn't work with str(object), this prints out the dataframe instead. I labelled my dataframe as Apple:
Apple = pd.Dataframe()
Then I was trying to do a for loop to save the the data into another dataframe. So i did it by: First, I stored the stocks in apple_stock_list, [Apple, Samsung] Then I wanted to do a for loop like this:
for stocks in apple_stock_list:
for feature in features:
apple_stock[str(stocks) + "_"+ feature] = stocks[feature]
However, str(stocks) does not change stocks into "Apple". Is there anyway I could get the Dataframe's variable name to be a string?
Thank you in advance!