Question: -Python- Create dataframe that is named as mydf using the Sample data: {'X':[78,85,96,80,86], 'Y':[84,94,89,83,86],'Z':[86,97,96,72,83]}. Print it. a) Explore mydf using describe, info, head, and tail

-Python- Create dataframe that is named as mydf using the Sample data: {'X':[78,85,96,80,86], 'Y':[84,94,89,83,86],'Z':[86,97,96,72,83]}. Print it.

a) Explore mydf using describe, info, head, and tail operations, e.g., mydf.describe()

b) Select the columns Y and Z from mydf and print them.

c) Select the first three rows from mydf and print them.

d) Select only the first two rows of the columns Y and Z in mydf. Print the result.

e) Add a new column named K and has the values [68,55,66,83,89] to mydf.

f) Remove the column Z from mydf.

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!