-1
Hello!! I’m a beginner in Python and I would like to count on your help for the problems below.
I have a df with 2 columns.
NOME N.CELULAR João Pedro 98 – 9112 1632 Luís Antônio 98 – 8513 4545 Renato gome 98 – 9002 4012 Selma lira 98– 8807 1943 Luiza ving 98 – 8125 1448 Paulo junior 98 – 9056 1435 Manoel mendonça 98 – 9115 1616
I need to create a third column of name ANO_NASCIMENTO
and insert/add data to it in a sequential manner, considering each row in the column NOME
. I believe you’re far from what I want, but I tried the job append
. The fact is I’m not sure how to do this.
df["ANO_NASC"] = ' '
ANO_NASC = [ ]
Ano_nasc = int(input('Qual o ano de seu Nascimento?'))
if Ano_nasc > 0:
ANO_NASC.append(Ano_nasc)
else:
print('Fim')
Any help will be welcome.
Are you using some library or just pure Python? If it is the second case, you can turn the second column into a list, and leave only the phones on the first! Thus, the number of each person serves to identify her.
– Krossbow
I am wearing pandas
– Oberdan Santos
So I have no experience to help you. Sorry.
– Krossbow
Anyway, thank you for trying.
– Oberdan Santos