Oct-28-2020, 10:22 AM
Hello, I am new to programming, have some questions , thanks !
I download stock quote from yahoo and return two dataframes, by 2 methods
data1 = yf.download('msft ibm v',start ='2020-10-5')
data2 = yf.download('msft ibm v' , group_by ='ticker',start ='2020-10-5')
both of them have two rows of header
question 1 :how to change data1 to data2 structure or change data2 to data1 structure?
question 2 :how to store the dataframe to csv or db , with 2 rows of header?

I download stock quote from yahoo and return two dataframes, by 2 methods
data1 = yf.download('msft ibm v',start ='2020-10-5')
data2 = yf.download('msft ibm v' , group_by ='ticker',start ='2020-10-5')
both of them have two rows of header
question 1 :how to change data1 to data2 structure or change data2 to data1 structure?
question 2 :how to store the dataframe to csv or db , with 2 rows of header?
#pip install yfinance import yfinance as yf data1 = yf.download('msft ibm v',start ='2020-10-5') data2 = yf.download('msft ibm v' , group_by ='ticker',start ='2020-10-5') data1.tail(5) data2.tail(5
