pyRasgo Methods

Return a Class Object

source = rasgo.get.data_source(id)

Class Methods

  • read_into_df(): Reads physical data into a pandas DataFrame

  • rename(new_name: str): Changes the DataSource "name" attribute

  • to_dict(): Returns a python dictionary of the DataSource's metadata attributes

  • to_yml(file_name: str, directory: str, overwrite: bool): Writes a yml file of the DataSource's metadata attributes to the directory of your choice

Sample Usage

source = rasgo.get.data_source(id)
print('Current Name', source.name)
source.rename('My New Source Name')
print('New Name', source.name)
source = rasgo.get.data_source(id)
df = source.read_into_df()
df.head()
source = rasgo.get.data_source(id)
src_dict = source.to_dict()
print(src_dict)

Last updated