Task 2(30 points): (Intro to Data Science: Pandas-dateframes) Write a program that does the following tasks with pandas

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Task 2(30 points): (Intro to Data Science: Pandas-dateframes) Write a program that does the following tasks with pandas

Post by answerhappygod »

Task 2(30 points): (Intro to Data Science: Pandas-dateframes)
Write a program that does
the following tasks with pandas DataFrames (as shown in the slides
"09-02-Data Science.pdf"):
(a) Create a DataFrame named temperatures from a dictionary of
three temperature readings
each for three people 'Maxine', 'James' and 'Amanda'.
(b) Recreate the DataFrame temperatures in Part (a) with custom
indices using the index
keyword argument and a list containing 'Morning', 'Afternoon' and
'Evening'.
(c) Select from temperatures the column of temperature readings for
'Maxine'.
(d) Select from temperatures the row of 'Morning' temperature
readings.
(e) Select from temperatures the rows for 'Morning' and 'Evening'
temperature readings.
(f) Select from temperatures the columns of temperature readings
for 'Amanda' and 'Maxine'.
(g) Select from temperatures the elements for 'Amanda' and 'Maxine'
in the 'Morning' and
'Afternoon'.
(h) Use the describe() method to produce temperatures' descriptive
statistics.
(i) Transpose temperatures (One example can be found at
https://www.geeksforgeeks.org/python-
pandas-dataframe-transpose/).
(j) Sort temperatures so that its column names are in alphabetical
order.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply