だから私は行ごとにcsvファイルを読んでいます。各行内で、フィールドごとに移動し、.getsizeof を使用して各フィールドのサイズをバイト単位で取得しようとします。コードは以下のとおりです。
for row in reader:
temp1 = []
temp2 = []
if type(row[0]) is IntType:
feed = feed + 1
print feed
# Total number of columns in a feed should be 61.
# 61st column account for the last , after 60th column, it would always be blank.
#if len(row) == 61:
# Total number of columns in a feed should be 61
for field in row:
if type(field) == 'int':
field.encode('ascii', 'ignore')
temp1.append(sys.getsizeof(field))
temp2.append(str(field))
else:
field = [unicode(field)]
#field = field.encode('ascii', 'ignore')
temp1.append(sys.getsizeof(field))
temp2.append(str(field))
何らかの理由で、すべての行にまたがるすべてのフィールドのサイズが 40 になっています。