Datasets

class LabGuruAPI._datasets.Dataset(**kwargs)[source]
class_name = 'LgData::Dataset'

The programmatic class name for the LG API

class_display_name = 'Datasets'

The human-readable class name for the LG API

xlsx_collection = 'Datasets'

The Dataset header/Plate upload name for the object class

headers: List[str]

A list of column headers used by the dataset

update_api(session: Session, **kwargs) LGI[source]

Low-level function, please do not use. LabGuruItem.lg_sync is likely the method you want.

get_data() DataFrame[source]

Retrieve a copy of the current data

set_data(new_data: DataFrame, merge_on: List[str] | None = None)[source]

Replace the current data with new data

Parameters:
  • new_data – The updated dataframe

  • merge_on – When updating a dataset, the columns used to determine “old” vs “new” data

add_data(new_data: DataFrame)[source]

Concatenates new data to the end of the current data

classmethod add_new(**properties) LGI[source]

Creates a new item AND adds it to the database

Parameters:

properties – The initial properties of the object

Returns:

A new instance of the class