0
>>> with open('Book2.csv', 'rb') as f:
    inpreader = csv.reader(f, delimiter=',')
    for row in inpreader:
        print ','.join(row)

IdNo, skillsList
BAXA0000206_NEENA_TIWARI_0.htm,[u'Training', u'E-Learning', u'PowerPoint', u'Teaching', u'Accounting', u'Team Management', u'Team Building', u'Microsoft Excel', u'Microsoft Office', u'Financial Accounting', u'Microsoft Word', u'Customer Service']
BAXA0000227_ABDUR_RAZZAQUE_0.htm,[u'Telecommunications', u'Data Center', u'ISO 27001', u'Management', u'BS25999', u'Technology', u'Information Technology...', u'Certified PMP\xae', u'Certified BS25999 Lead...']
BAXA0000261_Priya _ Lobo_0.htm,[u'Market Research', u'Segmentation', u'Marketing Strategy', u'Consumer Behavior', u'Experience Working with...']

我想找出技能列表中每个技能的词频..我该怎么做...

谢谢

4

1 回答 1

0
counter = {}
for skill_list in lists:
    for skill in skill_list:
        counter[skill] = counter.get(skill, 0) + 1

print counter
于 2013-08-23T09:09:11.883 回答