Project - Stock Closing Price Prediction using Deep Learning, TensorFlow2 & Keras

6 / 32

Loading the data

The price data for all the stocks are stored in prices-split-adjusted.csv file located in /cxldata/datasets/project/ny_stock_prediction/. This is a CSV(Comma Separated Values) file. We shall use read_csv method of pandas to read the data from the file.

INSTRUCTIONS
  • Load the data from prices-split-adjusted.csv file using pd.read_csv

    df = pd.<< your code comes here  >>('/cxldata/datasets/project/ny_stock_prediction/prices-split-adjusted.csv', header = 0)
    

    Here, header=0 indicates the line which could be used as the header of the data loaded from the specified csv file.

  • View the top 5 rows of the data stored in df using head().

    df.<< your code comes here >>()
    
  • Let us have a look at the shape of the data frame. Use shape to view the shape.

    df.<< your code comes here >>
    

    We could see that there are 851264 rows and 7 columns in the dataset.

  • "symbol" column in the dataset represents the symbols of different stocks in the dataset we loaded. Use df.symbol.unique() to view all the unique symbols.

    df.symbol.<<your code comes here >>()
    
Get Hint See Answer


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...