LocalCSVCodelistFactory
LocalCSVCodelistFactory allows for the creation of multiple codelists from a single CSV file. Use this class when you have a single CSV file that contains multiple codelists.
To use, create an instance of the class and then call the create_codelist
method with the name of the codelist you want to create; this codelist name must be an entry in the name_code_type_column.
Source code in phenex/codelists/codelists.py
__init__(path, name_code_column='code', name_codelist_column='codelist', name_code_type_column='code_type')
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
Path to the CSV file. |
required |
name_code_column
|
str
|
The name of the column containing the codes. |
'code'
|
name_codelist_column
|
str
|
The name of the column containing the codelist names. |
'codelist'
|
name_code_type_column
|
str
|
The name of the column containing the code types. |
'code_type'
|