How to convert collections.Counter to pandas DataFrame
Pandas can take care of the conversion of a Counter to a DataFrameby itself but you need to add a column label:
pd.DataFrame({"YourColumnLabelGoesHere": counterObject})
Full example
import pandas as pd
from collections import Counter
ctr = Counter()
ctr["a"] += 1
ctr["b"] += 1
ctr["a"] += 1
ctr["a"] += 1
ctr["b"] += 1
ctr["a"] += 1
ctr["c"] += 1
pd.DataFrame({"ctr": ctr})
This will result in the following DataFrame
: