Answer the question
In order to leave comments, you need to log in
How to fix 'DataFrame' object is not callable' error?
Hey!
When I iterate over the dataframe, I get the following error:
TypeError: 'DataFrame' object is not callable
In the code, I check if a numeric value is entered in a cell. Empty cell allowed
def read_file_to_df(file):
data = pd.read_excel(file)
for index, row in data.iterrows():
if row["Оценка"] is not None and type(row["Оценка"]) != float:
raise ValueError(_("Упс... Строка {} столбца Оценка должна содержать число или быть пустой!").format(index + 2))
return data
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question