You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The primary table of a data set is an object of type TableInspector that can be accessed using the Inspector class, and it is important for functionality like getting the csv url (to get a Pandas dataframe) or accessing the different columns of the data set. However at the moment, the way the primary table is accessed is by indexing the first element of the tables list object that can be accessed from the Inspector.
This is a simple task to make this process more user friendly as it is something that could be done quite often by users of the Inspect API.
Add a new primary_table property to the Inspector class that stores the primary (0th index) table from the existing tables list of TableComponent objects.
There are several unit tests in the file test_browsers.py that currently access the primary table using list indexing. Change them to instead use the new property you created and ensure the tests still pass as expected. (This file may be called "test_inspectors" if ticket Change Inspect package structure to allow simple Inspector importing #852 has been completed. If this ticket is done first, please rename it to that, as "test_browsers" is outdated.)
Update the worked example 3 documentation page (external-docs > docs > guides > inspect-api > example3.md) that shows the retrieval of the primary table from a data set, so it accesses the new property instead of list indexing the tables list. This is done in line 27 and 159.
The text was updated successfully, but these errors were encountered:
The primary table of a data set is an object of type
TableInspector
that can be accessed using theInspector
class, and it is important for functionality like getting the csv url (to get a Pandas dataframe) or accessing the different columns of the data set. However at the moment, the way the primary table is accessed is by indexing the first element of thetables
list object that can be accessed from theInspector
.This is a simple task to make this process more user friendly as it is something that could be done quite often by users of the Inspect API.
primary_table
property to theInspector
class that stores the primary (0th index) table from the existingtables
list of TableComponent objects.test_browsers.py
that currently access the primary table using list indexing. Change them to instead use the new property you created and ensure the tests still pass as expected. (This file may be called "test_inspectors" if ticket Change Inspect package structure to allow simple Inspector importing #852 has been completed. If this ticket is done first, please rename it to that, as "test_browsers" is outdated.)tables
list. This is done in line 27 and 159.The text was updated successfully, but these errors were encountered: