I got the following dataframe:
| Contact | Gender | Title |
|---|---|---|
| 1 | M | |
| 2 | F | Dear Ms |
| 3 | Female | Dear Ms |
| 4 | F. | Dear Ms |
| 5 | M | |
| 6 | M | |
| 7 | M. | Dear Mr |
How can I change contact 2,3,4 and 7 based on the Title column.
Ms is F and Mr is M
The other contacts who don't have a Title, must nothing happen to it. It must be the same.
So i want this:
| Contact | Gender | Title |
|---|---|---|
| 1 | M | |
| 2 | F | Dear Ms |
| 3 | F | Dear Ms |
| 4 | F | Dear Ms |
| 5 | M | |
| 6 | M | |
| 7 | M | Dear Mr |