pandaspgs.publication.Publication

An object that stores data of type Publication. To understand the significance of each column of the DataFrame. Please visit "Publication" in PGS Catalog Documentation for details.

Attributes:
  • raw_data

    list. Convert from obtained JSON data

  • publications

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • associated_pgs_ids

    DataFrame. It only exists if the parameter mode of constructor is Fat.

  • mode

    Fat or Thin. Specifies the mode of the returned object.

from pandaspgs.get_publication import get_publications

ch = get_publications(pgs_id='PGS000001')
ch
ch.raw_data
ch.mode
ch.publications
ch.associated_pgs_ids

Subset object s by either identifier or position

all_df = get_publications()
all_df[0].publications
all_df[0:3].publications
all_df['PGP000001'].publications
all_df[('PGP000001','PGP000002','PGP000003')].publications

Objects can be manipulated like sets in the mathematical sense.

one = get_cohorts(ppm_id='PPM000001')
two = get_cohorts(ppm_id='PPM000002')
three = get_cohorts(ppm_id='PPM000003')
one_and_two = one+two
two_and_three = two+three
only_one = one_and_two - two_and_three
only_two = one_and_two & two_and_three
one_and_two_and_three = one_and_two | two_and_three
one_and_three = one_and_two ^ two_and_three

__init__

__init__(data: list = [], mode: str = 'Fat')
Parameters:
  • data (list, default: [] ) –

    Raw JSON data.

  • mode (str, default: 'Fat' ) –

    Fat or Thin. Specifies the mode of the object.