Question: BY PYTHON- FROM TMU, THANKS FOR HELPING! Create a new dictionary, name it your firstname where firstname _fruits is your first name. Add four items

BY PYTHON-

FROM TMU, THANKS FOR HELPING!

Create a new dictionary, name it your firstname where firstname _fruits is your first name.

Add four items to the dictionary with names of your favorite fruits as keys and the respective color as values.

Convert the dictionary into a pandas series named firstname_f.

Print out the second and third items.

Create a sub series named firstname_f2 containing the second and third items.

Printout from the sub series the last item using iloc

Add a cell with the following logic:

Create a list containing four rainfall amounts of values 10, 23,24,30 name the list firstname_amounts.

Using pandas create a date_range for todays date/time (you can set any time) with four time intervals.

Create a series that combines both the list and date range name it firstname_rainfall amounts_today.

Plot as bar chart

Make a copy of the dataframe d5 and name it fristname_d5, carryout the following:

print out a dataframe containing all private columns

Swap the columns and rows (hint: look at transpose)

Make a copy of the dataframe people and name it fristname_people, carryout the following:

Add a column named education and fill in Diploma for alice, and Masters for bob

Print out everything related to alice.

Create an expression to print out a Boolean from the people dataframe any one shorter 180

Use the query() to query the people dataframe you created earlier and retrieve everything related to alice.

Add a cell to create a dataframe containing grade for four students choose the name of the students and use the names as index. For columns create four columns to reflect the months April, May, June, July. Set grade items for each student for each month to be between 0 and 100. Name the dataframe fristname_grades. Carry out the following using pandas operations:

Print out the average for the month of April

Adjust all the grades by 2% (i.e. increase)

Printout the grades for the month of may that are higher than 50%

Group the failing students i.e. the students with average over four month below 50%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!