Answered step by step
Verified Expert Solution
Link Copied!

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

S&P500 Constituents
For the following questions, the file sp500-constituents.csv is provided, which contains a list of stocks in the S&P 500 and certain data about each. Use pandas read_csv() 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

Students also viewed these Databases questions

Question

Create a Fishbone diagram with the problem being coal "mine safety

Answered: 1 week ago