2
I have an API that extracts the phone number. It works as follows. By passing a number on it, returns me 3 variable type string containing phone with country code, type if it is cellular or fixed and the
telefone,tipo,ddd = extract(numero=34900001111).get_numero()
But I need to take all the numbers in a column in a dataframe and create 3 other columns with the strings returned for each number in that column. So I tried to do a function to use the API as follows:
def telefone():
for i in df2['TELEFONE']:
telefone,tipo,ddd = extract(numero=i).get_numero()
df2['TEL'] = telefone
df2['TIPO'] = tipo
df2['DDD'] = ddd
So I did it by taking a number and creating the 3 columns, but always with the same output for all rows. Can someone help me figure out where I’m going wrong?
Then I want to take a closer look to understand how this
numpy
. But you’re damn right it worked. Thank you– Luciano Amaro
And in case I have 2 parameters , how will be? Types need to pass the Phone and DDD, to create the same columns?
– Luciano Amaro