Capstone Project - Import and Prepare the Data

Course Name: Volatility Trading Strategies for Beginners, Section No: 24

In the csv file with the data of S&P500 stock prices of solution downloadable, the sheet is organized with the values of Close, High, Low,.. for each tickers (the columns). While, in the csv file that I create with the code of "Getting Market Data" course, the sheet is organized with the tickers for each value of Close, High,.. How can I convert the last file, like the first?

Hi,



Let's say you have a dataframe "data" which contains OHLCV data of multiple tickers like BAC, A etc. and the column names are "Close", "High", then you can access one column in it by using "data["BAC"].High". Here, you are accessing the "high" value of the "BAC" stock ticker.



However, if you want only one stock ticker's OHLCV data in one dataframe, then you can simply extract the ticker's data from "data" and store it in another dataframe like the one seen in the solution downloadable with the data of S&P500.



Hope this helps. If I am not able to help, please help me by clarifying the exact columns of the csv files.