pandas do this very well:
books = {}
books["auth1"] = {}
books["auth2"] = {}
books["auth1"]["humor"] = 20
books["auth1"]["action"] = 30
books["auth2"]["comedy"] = 20
from pandas import *
df = DataFrame(books).T.fillna(0)
The output is:
action comedy humor
auth1 30 0 20
auth2 0 20 0