How to handle outliers?

How to handle outliers?
Should we remove those data completely or should those specific values be replaced by mean or median.

Outlier handling is an aspect in itself altogether. There are different ways to handle them in which removing them is one way but you have to be careful based on the data you have. Feel free to explore. As for any column having only 1 value I generally drop it since it won’t add any value and I think would not make much sense. Having said that you have to check both your train set and the unseen test set. If there is a discrepancy between the unique values of column/s between them, then again we go into experimentation mode.

Outliers: I’m totally aligned with @Binai Rai’s accurate answer. In addition, you’ll need to analyze the context, first. If there’s an age Series with a negative value, for instance, that might be considered as an outlier, according to the context, which may indicate experimental error. The treatment for this value will probably be an imputation with some mean, median or other strategies. However, if a bathroom’s series has a value of 20 and you effectively detect that a house has this number of bathrooms, although it is an outlier, it is due to variability in the measurement rather than an error, so the treatment should be different.