Python Forum
How to fill empty values with mean
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fill empty values with mean
#3
I don't want to replace empty with '0's or remove them. But, I want to replace the empty cell with mean of the above rows.
1.25 in row3 is becasue: The row3 in column1 in original data is an empty cell, and I replace with the mean of row1& row2(of column1)i.e, meanof 1 & 1.5 is 1.25.

About 2.80: is: Because in original data, the row7 is empty, and it is replace with mean of row4,row5,row6
I did not take the average of row1~row6, because row3 was empty in original data, I omit row1~row3.
Row10 was empty in original data, and it is replace with the average of row8 &row9 (brcasue row7 was empty in original data, adn removed all rows up to row7.
Reply


Messages In This Thread
How to fill empty values with mean - by SriRajesh - Jan-19-2019, 09:19 AM
RE: How to fill empty values with mean - by SriRajesh - Jan-20-2019, 07:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to generate rows based on values in a column to fill missing values codesmatter 1 2,162 Oct-31-2020, 12:05 AM
Last Post: Larz60+
  Unable to assign selected values from existing list to an empty list haiderhussain 5 4,593 Jan-19-2017, 05:57 AM
Last Post: haiderhussain

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020