I have a dataset with some features. Over one feature, there are some values that appear only once. Can I safely remove these rows, or do they need to be kept ?
If you have a categorical feature of which one level appears only once in the data, then an algorithm that estimates its parameters with that data will assign all the residual for that observation to that feature (unless you have some regularization in place).
Thus, that would probably be a very incorrect estimate, as it will just try to correct all the errors from the other parameters, and as such will probably not generalize to newer observations. This of course depends on the data that you have, the number of features, the goodness of fit (e.g. if your goodness of fit or classification accuracy is something like 99% then perhaps it might not be so bad to include that feature/row, especially if you are using high regularization parameters) and other factors, but in most cases you’d be better off leaving that feature out, or if possible, merging that into another category.