import pandas as pd
import collections
df = pd.DataFrame(columns=['a','b','c','d'])
counter = collections.Counter({'a':1, 'b':2})
What I want to do is insert counter
to df
so that the result would be like this:
a b c d
0 1 2 0 0
How can I do this?