Python code for the retrieval and organization of stock data