asreview.Record#
- class asreview.Record(dataset_row: int, dataset_id: str, title: str = '', abstract: str = '', authors: list = <factory>, keywords: list = <factory>, year: int | None = None, doi: str | None = None, url: str | None = None, included: int | None = None)[source]#
Bases:
BaseMethods
__init__(dataset_row, dataset_id[, title, ...])A simple constructor that allows initialization from kwargs.
Get the list of database column names.
Get the mapping from record column name to pandas data type.
validate_included(key, included)validate_list_of_string(key, value)validate_optional_integer(key, value)validate_string(key, value)Attributes
Refers to the
_schema.MetaDatacollection that will be used for new_schema.Tableobjects.Refers to the
_orm.registryin use where new_orm.Mapperobjects will be associated.- duplicate_of#
- classmethod get_columns()#
Get the list of database column names.
- Returns:
list[str]
- classmethod get_pandas_dtype_mapping()#
Get the mapping from record column name to pandas data type.
By default it uses the mapping from __sqlalchemy_to_pandas_dtype_mapping__, but you can overwrite this method if you need different behavior.
- Returns:
dict[str, str] – Dictionary whose keys are record column names and the values are the corresponding pandas data type that the column should have when reading it into a pandas object.
- group_id#
- metadata: ClassVar[MetaData] = MetaData()#
Refers to the
_schema.MetaDatacollection that will be used for new_schema.Tableobjects.See also
orm_declarative_metadata
- registry: ClassVar[registry] = <sqlalchemy.orm.decl_api.registry object>#
Refers to the
_orm.registryin use where new_orm.Mapperobjects will be associated.
- type_annotation_map = {<class 'list'>: <class 'sqlalchemy.sql.sqltypes.JSON'>}#