@classmethod
def digraph_from_df(cls, df, flattening_method=None, weight_mapping=None):
    """Create a digraph from a pandas DataFrame."""
    net = cls.from_df(df)
    return net.to_digraph(flattening_method=flattening_method,
        weight_mapping=weight_mapping)
