# Encoding feature containing both text and string?

I have a feature which has following entries:-

| Exterior |
| -------- |
| Vinyl    |
| Wd Sdng  |
| MetalSd  |
| Wd Sdng  |
| HdBoard  |
| BrkFace  |
| Wd Sdng  |


and so on.

I am assuming that Wd Sdng is a text value and other values are string (but please correct me if I am wrong).

How do I encode this feature since it has both text and string values?

Should I perform a OneHotEncoding or should I perform some kind of NLP encoding (Tfidf etc)??

• Is it possible to clarify the question better with some real data points? Nov 2 '21 at 6:00
• @jdsuryap edited. Basically my question is, since I have both text (Wd Sdng) and string (vinyl, MetalSd and others) values, how do I encode this feature? Nov 2 '21 at 7:13

• But isn't Wd Sdng a text value as it comprises of 2 strings? Nov 2 '21 at 17:17
• I want to perform a regression task on this data. So I should treat Wd Sdng as a string and perform One hot encoding? Nov 3 '21 at 5:03
After hours of searching online, I think I finally got the answer. The observation Wd Sdng is not a text type. It is considered a string type (don't know why!) and to encode it, the best thing would be to join both the words, as in WdSdng and then apply usual encoding techniques (not text encoding!).