I face a lot of trouble while dealing with missing values and undefined values in my data. I wanted to know what are the most general and best ways to deal with missing values in our data. And how to handle undefined values which occur while performing transformations on our variables such as log() etc. Which is the better choice: equating them to the mean of the remaining values or something like that OR equating them to some constant like 0. And how to know what to do in which situation?