-1
I have a column in the spreadsheet in Excel with the following column:
Atendido por
Ismael (100)
JEFFERSON LUIZ ESTEVAO DE MOURA (111)
Felipe Braga Regis Souza (222)
I have to take just the name and put in a new column and the extension in another, if the example below:
ANALISTA RAMAL
Ismael 100
JEFFERSON LUIZ ESTEVAO DE MOURA 111
Felipe Braga Regis Souza 222
My code:
arquivoxlsx = pd.read_excel('C:/Users/Desktop/Python/Base/Atendidas.xlsx')
Atendidapor = arquivoxlsx["Atendida por"]
cont = 0
indice = 0
for c in Atendidapor:
Analista = arquivoxlsx.at[cont,'Atendida por']
tamanhomatriz = len(Analista.split())
# print(registro)
while True:
registro = Atendidapor.get(indice)
if indice < tamanhomatriz:
arquivoxlsx.at[cont, 'Analista'] = registro + ""
else:
arquivoxlsx.at[cont, 'Analista'] = "" + registro
indice = 0
break
indice += 1
#
cont += 1