Question: Please answer 2nd question using Python Programming develop statements to further refine the data. a) SEC filings: Use the drop() method to take out the
Please answer 2nd question using Python Programming
develop statements to further refine the data. a) SEC filings: Use the drop() method to take out the SEC filings column from the DataFrame. b) Headquarters location: Use the split() method to create two new fields, one for city and one for state. c) Date first added missing values: Create a DataFrame that has the symbols with those stocks where the Date first added field is missing a value. indicated for this field. e) Founded (missing values): Create a DataFrame that has the symbols with those stocks where the Founded column is missing a value. indicated for this field. 2) S\&P 500 Price Data the prices data, Symbol and Date together uniquely define a row. a) Use read_csv() to load two files, sp500-constituent.csv and sp500-prices.csv, each into their own DataFrame. b) Rotate data: Transform the data organization for the price DataFrame, so prices for each date are each in their own dated column: for example, price-20201031, price-20200930, and so on. c) Augment data: Add a column that is the difference between the price on the last available date and the price on the prior available date. d) Missing values: Determine which stocks do not have price data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
