Question: There are a few missing values (NaN values) in the column 'depth' and they are to be filled with the average value of the column

There are a few missing values (NaN values) in the column 'depth' and they are to be filled with the average value of the column categorized by the cut of the diamond ('cut' column). Which of O data [ ' depth' ]. fillna(value = data.groupby([ 'cut' ]) [ ' depth' ]. transform( 'mean' ) ) the following code snippets can be used to do the same? O data[ 'cut']. fillna(value = data. groupby([ ' cut' ]) [ ' depth' ]. transform( 'mean' ) ) O data[ ' depth' ]. fillna(value = data. groupby([' depth' ]) [' cut' ]. transform( 'mean' )) O data[ ' depth']. fillna(value = data. groupby(['cut' ]) ['cut' ]. transform( 'mean' ) )

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 Mathematics Questions!