Answered step by step
Verified Expert Solution
Question
1 Approved Answer
S & P 5 0 0 Constituents For the following questions, the file sp 5 0 0 - constituents.csv is provided, which contains a list
& Constituents
For the following questions, the file spconstituents.csv is provided, which contains a list of stocks in the S&P and certain data about each. Use pandas readcsv to load the file into a DataFrame, and for each part below, 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.
d Date first added multivalued: Find rows where "Date first added" is different from a single date, then use statements to create a new column that determines and populates the date in first position if more than one date is 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.
f Founded multivalued: Find rows where "Date first added" is different from a single date, then use statements to create a new column that determines and populates the date in first position if more than one date is indicated for this field.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started