I believe you should change just as you are passing the data in the parameter columns
, by the documentation this parameter receives a dict-like
. All you have to do is exchange parentheses ()
by keys {}
.
The right call to function rename
would be:
df.rename(columns = {"nome_motorista***************": "nome_motorista"})
PS: I’m imagining that you are making the read calls correctly, since you didn’t put this part in the code, if this part is your complete code, there is more that needs to be done before.
See documentation from name