start_time = time.clock() result = 0 for row in df.itertuples(index=False): result += max(row[df.columns.get_loc('B')], row[df.columns.get_loc('C')]) total_elapsed_time = round(time.clock() - start_time, 2) print("4. Polyvalent Itertuples working even with special characters in the column name done in {} seconds, result = {}".format(total_elapsed_time, result))