I have data similar to this in the csv file
Symbol,Action,Year AAPL,Buy,2001 AAPL,Buy,2001 BAC,Sell,2002 BAC,Sell,2002
I can read it and group it this way
df.groupby(['Symbol','Year']).count()
I get
Action Symbol Year AAPL 2001 2 BAC 2002 2
I wish it (order doesn't matter)
Action Symbol Year AAPL 2001 2 AAPL 2002 0 BAC 2001 0 BAC 2002 2
I want to know if null events can be counted
pandas
Ninja gaiden
source share