Answered step by step
Verified Expert Solution
Link Copied!

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 1-5, you can manipulate the data-frames/dictionaries as you see fit and using whatever
functions/libraries you want. However, it is critically important that your end results for each problem match
the provided variable name (ex: the result of problem 1 is called df_prob1) so that they are accessible for
grading.
iv. With the exception of problem 1(which is trivial) you should include a few comments in your notebook or
code that make it clear what your thought process and/or code does to address each problem. Failure to do so
will result in penalties (2 points) per problem.
Load the .csv file into a pandas data-frame (DataFrame) called df_prob1 with appropriate rows and columns.
Each row must represent an individual object, while each column must represent a particular attribute/variable
(Object Number, Title, Dynasty, etc.)
Many columns of this data are missing entirely (i.e. 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 df_prob1 that
excludes these columns entirely called df prob2.
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 df_prob2 called
df_prob3 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 df_prob3.
The objects in the dataset include a column "Artist Role." You are to create a copy of df_prob3 called df_prob4
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 object/row will appear in the df_prob4 data-frame.
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 2024 CSE 532 Mid-term Programming Portion
Nate: for part 5 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 df_prob4 called df_prob5 and add a new column to df_prob5 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 1890 and
"Object End Date" of 1910 would have a DecadesToMake value of 2, while another object with begin date of
1932 and end date of 1941 would have a DecadesToMake value of 0. 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 0.
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 df_probs, with classification labels on the x-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 (df_prob1) and will not
reflect the expected results you will observe for df_probs. 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.
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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

3. What might you have done differently?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago