0
data = data.fillna(data.groupby(['product_id'], as_index=False).median())

dataset shape is (336666,665). It show 4178 Nan value in 10 columns and few columns have 4.After Executing code its become 3872. Any suggestions regarding this. I have try other code also but that code doing nothing.

lx_pmu_p1fh1_slope_x_index_10    4178
lx_pmu_p1fh1_slope_x_index_11    4178
lx_pmu_p1fh1_slope_x_index_12    4178
lx_pmu_p1fh1_slope_x_index_13    4178
lx_pmu_p1fh1_slope_x_index_14    4178
                                 ... 
steering_gear_ratio                 4
steering_wheel_position             4
wheel_base                          4
wheel_brake_type                    4
veh_reg_no                        519
Length: 456, dtype: int64
lx_pmu_p1fh1_slope_x_index_10    3872
lx_pmu_p1fh1_slope_x_index_11    3872
lx_pmu_p1fh1_slope_x_index_12    3872
lx_pmu_p1fh1_slope_x_index_13    3872
lx_pmu_p1fh1_slope_x_index_14    3872
                                 ... 
steering_gear_ratio                 4
steering_wheel_position             4
wheel_base                          4
wheel_brake_type                    4
veh_reg_no                        519
Length: 456, dtype: int64

0 Answers0