Fill NaN Values
NaN stands for Not A Number, and is often how missing data is represented with in a dataframe. Dealing with NaN values within your analysis can effect your results in unwanted ways, and as such Mito provides an interface for filling these missing values with appropriate substitutes.
NaN values stand in for missing numbers, but there are also NaT values for Not A Timestamp for datetime and timedelta columns. Mito will allow you to replace these values as well.
To fill NaN values:
- 1.Select the
Fill NaN Valuesto open the taskpane.
- 3.Select the dataframe you wish to fill nan values within.
- 4.Select the columns you want to fill NaN values within.
- 5.Configure the
Fill Methodto fill NaN values as you wish.
- 6.Click the
Fill NaNbutton to fill NaN values in these columns.
A Mitosheet with the Fill NaN taskpane, with each step highlighted.
Depending on your analysis, you may want to fill nan values different. Mito provides a few options for filling NaN values in your dataset.
Values: Replaces NaN values with a specific value that you input. An input appears and allows you to input a string, number, boolean, or datetime.
Forward Fill: Replaces NaN values with the value from the same column in the row before in the dataframe.
Back Fill: Replaces NaN values with the value from the same column in the row after in the dataframe.
Column Mean: Replaces NaN values in the column with the mean values from that column. Note that this can only be applied to number, datetime, and timedelta columns. String and boolean columns have no valid defintion of a "mean" value.
Column Median: Replaces NaN values in the column with the median values from that column. Note that this can only be applied to number, datetime, and timedelta columns. String and boolean columns have no valid defintion of a "median" value.