python-tablefu
python-tablefu copied to clipboard
the "total" function does not work on a table which generated by filter.
for example:
t1 = TableFu()
t2 = t1.filter(type='xxx')
t2.total('column_name')
the last cause will raise an error such like:
D:\tools\WinPython-32bit-2.7.3.3\python-2.7.3\lib\site-packages\table_fu\__init__.pyc in __getitem__(self, column_name)
343 datum = self.get(column_name)
344 if datum is None:
--> 345 raise KeyError("%s isn't a column in this table" % column_name)
346 else:
347 return datum
KeyError: "3 isn't a column in this table"