oakvar.lib.util.util
get_df_from_db
get_df_from_db(
db_path,
table_name="variant",
sql=None,
num_cores=1,
conn=None,
library="polars",
)
Gets a Polars DataFrame of a table in an OakVar result database.
| PARAMETER | DESCRIPTION |
|---|---|
db_path
|
Path to the OakVar result database file from which a Polars DataFrame will be extracted.
TYPE:
|
table_name
|
Table name to dump to the DataFrame
TYPE:
|
sql
|
Custom SQL to apply before dumping to the DataFrame.
For example,
TYPE:
|
num_cores
|
Number of CPU cores to use
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
|
DataFrame of the given or default table of the OakVar result database |