Encipher
Encipher

Reputation: 2936

mode for impute missing value in Pandas

I want to fill missing values pandas.dataframe.mode. I got df.fillna(df.mode().iloc[0]) from this link but I can not understand the working principal of mode.

My dataset is a categorical dataset.

I would also like to know is there any method in Weka to fill the missing values using mode?

Upvotes: 0

Views: 225

Answers (1)

fracpete
fracpete

Reputation: 2608

The ReplaceMissingValues filter inserts means (numeric attributes) and modes (nominal attributes).

If you want more options for injecting missing values or replacing them, check out the following (unofficial) Weka package:

https://github.com/fracpete/missing-values-imputation-weka-package

Upvotes: 1

Related Questions