0
beauty?
Can I get a little help? Just call.
I have a dataframe with some string information and wanted to change them to text.
To simplify, imagine that the table contains information of the person’s gender, for example, male or female. My program would classify as 0 or 1.
Until he can do it well. But the problem is when I have a lot of information inside the table, the program is running all day. when I run out of patience and cancel, sometimes he converted the units and sometimes not.
my python code ta so oh:
```python
y='Indice da Tabela'
def toText(x):
return(list(train[y].value_counts().index).index(x))
train[y]=train[y].apply(toText)
```