Python TypeError: 'list' object is not callable -
# -*- coding:utf-8 -*- import codecs import numpy np import csv import pandas pd* nons_file=pd.read_csv(r'c:\users\roy\desktop\bighomework\new\non_subscibe\session.csv') s_file=pd.read_csv(r'c:\users\roy\desktop\bighomework\new\subscribe\session1.csv') s_file['subscribe'] = 1 nons_file['subscribe'] = 0 file=s_file.append(nons_file, ignore_index=false, verify_integrity=false) id_dict={} count=0 in range(len(file.index)): if file[i].id not in id_dict: count+=1 file[i].id id_dict[id]=count else: file[i].id=id_dict[id] id_dict={} count=0
typeerror traceback (most recent call last) “for in range(len(file.index)):” typeerror: 'list' object not callable
Comments
Post a Comment