pypath.inputs.opentargets.opentargets_adverse_reactions§

pypath.inputs.opentargets.opentargets_adverse_reactions(return_df: bool = False, by: bool = False) Generator[dict] | dict | pd.DataFrame[source]§

Drug adverse reactions from Open Targets.

Parameters:
  • return_df – Return a pandas data frame.

  • by – Name of the variable to be used as top level key in the returned dictionary. If True, the default grouping variable for the given dataset will be used. If False, no grouping will be performed.

Returns:

Drug-adverse reaction records as a list of dicts by default; or a pandas data frame if return_df is True; or a dict of list of dicts if by is not False.