Answered step by step
Verified Expert Solution
Question
1 Approved Answer
iii. For problems 1 - 5 , you can manipulate the data - frames / dictionaries as you see fit and using whatever functions /
iii. For problems you can manipulate the dataframesdictionaries as you see fit and using whatever
functionslibraries you want. However, it is critically important that your end results for each problem match
the provided variable name ex: the result of problem is called dfprob so that they are accessible for
grading.
iv With the exception of problem which is trivial you should include a few comments in your notebook or
code that make it clear what your thought process andor code does to address each problem. Failure to do so
will result in penalties points per problem.
Load the csv file into a pandas dataframe DataFrame called dfprob with appropriate rows and columns.
Each row must represent an individual object, while each column must represent a particular attributevariable
Object Number, Title, Dynasty, etc.
Many columns of this data are missing entirely ie no values are present for any objects Use Python to
determine which columns are missing for all of the provided objects and create a modified copy of dfprob that
excludes these columns entirely called df prob
Hint: There are multiple ways to do this, but you may want to look into the pandas member function isna.
Suppose we are only interested in objects in the public domain. You are to create a copy of dfprob called
dfprob that consists only of those objects where the Is Public Domain" column is "TRUE"; note that if the Is
Public Domain" column does not contain any string for a given object, it should not be present in dfprob
The objects in the dataset include a column "Artist Role." You are to create a copy of dfprob called dfprob
that includes the string "Maker" within the "Artist Role" column. Note while this may seem trivial, the "Artist
Role" column can contain multiple rales for a given object. You must be certain that if at least one of the roles is
Maker, then the objectrow will appear in the dfprob dataframe.
Hint: you con use regular expressions for this problem, but it is not required, nor is it likely the easiest way to
handle the problem.
Spring CSE Midterm Programming Portion
Nate: for part you will want to utilize the "Object Begin Date" and "Object End Date" columns in your data
manipulation. The "Object Date" column is unreliable and largely missing in information.
For this part, you are to create a copy of dfprob called dfprob and add a new column to dfprob called
Decodes ToMake, which represents the number of decades that have elapsed between the start year and end
year of the object's creation rounded down. For example, an object with "Object Begin Date" of and
"Object End Date" of would have a DecadesToMake value of while another object with begin date of
and end date of would have a DecadesToMake value of Note: Any object missing either start date
or end date, or with a start date and end date in the same year, should have a DecadesToMake value of
Most objects in the dataset have a Classification. For this problem, you are to produce a bar plot depicting the
ten most common Classifications for objects in dfprobs, with classification labels on the axis and counts on the
axis, sorted in descending order of counts from left to right. The example below should give you an idea of the
format you want to use, but note that this was generated using the basic Dataframe dfprob and will not
reflect the expected results you will observe for dfprobs. In fact, you may not see some of these same
classifications at all on your plot, for example.
Please code this in a jupyter notebook.
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