Skip to content

Commit d22f516

Browse files
committed
added getitem to phenextable. all tests now run
1 parent 09dd2c3 commit d22f516

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

phenex/filters/categorical_filter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
self.domain = domain
3131
super(CategoricalFilter, self).__init__()
3232

33-
def _filter(self, table: 'PhenexTable', tables:dict):
33+
def _filter(self, table: 'PhenexTable', tables:dict = None):
3434
if self.column_name not in table.columns:
3535
if self.domain not in tables.keys():
3636
raise ValueError(f"Table required for categorical filter ({self.domain}) does not exist within domains dicitonary")

phenex/tables.py

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ def __getattr__(self, name):
6060
# pass all attributes on to underlying table
6161
return getattr(self._table, name)
6262

63+
def __getitem__(self, key):
64+
return self._table[key]
65+
6366
@property
6467
def REQUIRED_FIELDS(self):
6568
return list(self.DEFAULT_MAPPING.keys())

0 commit comments

Comments
 (0)