omnipath.requests.Annotations.pivot_annotations
- classmethod Annotations.pivot_annotations(df)[source]
Annotations from narrow to wide format
Converts the annotations from a long to a wide dataframe format, reconstituting the format of the original resource.
- Parameters:
df (
DataFrame
) – An annotation dataframe.- Returns:
A dataframe of various molecule (protein, complex, gene, miRNA, small molecule) annotations. If the data contains more than one resource, a dict of dataframes will be returned, one for each resource.
- Return type:
pandas.DataFrame
or dict