TypeError: 'str' object is not callable in python

I’m starting to code right now, but I’ve searched on google and found an answer: I know the problem is a variable that is already predefined in python that needs to be renamed, but I can’t find it. Can someone help me?

import os
import pandas as pd

lista_arquivo = os.listdir(fr"C:\Users\Master\Desktop\cursos\projetos\PYTHON\Faturamento_AM")


tabela_total = pd.DataFrame()

for arquivo in lista_arquivo:
    if "abril.xlsx" in arquivo():
        tabela = pd.read_excel(fr"C:\Users\Master\Desktop\cursos\projetos\PYTHON\Faturamento_AM\{arquivo}")
        tabela_total = tabela_total.append(tabela)


tabela_faturamento = tabela_total.groupby('Faturamento').sum()

TypeError: ‘str’ object is not callable

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.