# What are the best way to handle missing values [closed]

Suppose we have a dataframe df in python, with numerical and categorical variables.

For Numerical, when do we replace by mean and when by median.

For Categorical, is there an approach which needs to be followed.

## closed as primarily opinion-based by Stephen Rauch♦, timleathart, Icyblade, Sean OwenOct 9 '17 at 15:30

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.