from pandas import compat

def to_dict_custom(data):
    return dict((k, v[v < 0].to_dict()) for k, v in compat.iteritems(data))
dfasdict = to_dict_custom(df1)
Pandas dataframe into sparse dictionary of dictionaries