JGuizard
6/30/2016 - 8:16 AM

Create Counter in python

Create Counter in python

import pandas as pd

data = pd.read_csv("data/stackoverflow_sample.csv.gz")
data.columns

from collections import Counter

tags_counter = Counter()

for tags in data.Tags:
    tags_counter.update(tags.split())
    
tags_counter.most_common(10)