Skip to content

Commit f49e861

Browse files
committed
fix: add show to get_table_data_all()
1 parent fccb288 commit f49e861

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/pxweb/api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ def get_table_data(
490490
def get_table_data_all(
491491
self,
492492
table_id: str,
493+
show: Literal["code", "value", "code_value"] | None = None,
493494
) -> list[dict]:
494495
"""
495496
Get table data that can be used with dataframes like `polars` or `pandas`. The query is constructed from the metadata.
@@ -499,6 +500,8 @@ def get_table_data_all(
499500
----------
500501
table_id: str
501502
An ID of a table to get data from.
503+
show: str, optional
504+
Set to "code_value", "code" or "value", to specify what to show in the categorical columns.
502505
503506
Returns
504507
-------
@@ -509,8 +512,7 @@ def get_table_data_all(
509512
k: ["*"] for k in self.get_table_variables(table_id).keys()
510513
}
511514
return self.get_table_data(
512-
table_id,
513-
value_codes=selection_all,
515+
table_id, value_codes=selection_all, show=show
514516
)
515517

516518
def all_tables(self) -> list[dict[str, str]]:

0 commit comments

Comments
 (0)