How to deal with mixed type features? I'm working on a dataset with more than 2000 features. Most of the features contain both numerical values and categorical features. For example, in the feature represents how long has the user been living in the current address, the value could be numbers or some letters which mean the value cannot be obtained due to some reasons.
I don't know how to process these features. If they are just pure numerical or categorical values, things will much easier. But since they are mixed, I'm really confusing. Could anyone give me some advice?
Update: I may not express clearly that it is not a dataset include both numerical features and categorical features. I mean in one feature, there are both numerical values and categorical values.
For example: (here M, C, T mean that because of different reasons, no exact values can be found)
TOTAL INCOME
3000
5000
M
8000
C
4000
T
The best will be to have domain knowledge and understand how this feature affects the target and what will be the best way to encode it:
First way: treat them all as a categorical feature with high cardinality.
Second way: split them into two columns, one categorical and one numerical. And then treat them separately.
Without domain knowledge in this case I cant think of on something better. Answering this question would help: Is the number really a number? Why can I have numbers and strings in the same column? How will this information might help my model?