Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this exercise, please first create a DataFrame to store the following table and then finish the questions (use np.nan to represent missing value NaN)

image text in transcribed

In this exercise, please first create a DataFrame to store the following table and then finish the questions (use np.nan to represent missing value NaN) \[ \text { ord_no } \quad \text { customer_id } \] 0 NaN NaN NaN NaN 1 NaN 270.65 2012-09-10 3001.0 270002.065 .26 NaN 3001.0 3 70003.0 NaN NaN NaN 4 NaN 948.50201209103002.05 70005.0 2400.60 2012-07-27 3001.0 6NaNNaN 2012-09-10 3001.0 770010.01983.43NaN3004.0870003.02480.40201210103003.0970012.0 250.45 2012-06-27 3002.010 NaN 75.29 2012-08-17 3001.011 NaN NaN NaN NaN Q1. Count the number of NaNs in dataframe (by column) and fill all the NaNs with -1 In[]: Q2. Write a Pandas program to select columns whose number of NaNs between 2 and 4 In[]: Q3. For column 2, write a Pandas program to replace the missing values with median of the values present in this column In[]: Q4. For column 1, 3, 4, write a Pandas program to replace the missing values with the most frequent values present in each column In[]

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

58 Occupational injury and illness prevention programs.

Answered: 1 week ago

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago