swat.cas.results.CASResults.get_tables

CASResults.get_tables(name, set=None, concat=False, **kwargs)

Return all tables ending with name in all By groups

Parameters:
name : string

The name of the tables to retrieve. This name does not include the “ByGroup#.” prefix if By groups are involved. It also does not include “ByGroupSet#.” if By group sets are involved.

set : int, optional

The index of the By group set (if the action supports multiple sets of By groups).

concat : boolean, optional

Should the tables be concatenated into one DataFrame?

**kwargs : any, optional

Additional parameters to pass to pandas.concat().

Returns:
list of DataFrames

Examples

>>> conn = swat.CAS()
>>> tbl = conn.read_csv('data/cars.csv')
>>> out = tbl.summary()
>>> print(list(out.keys()))
['Summary']
>>> print(len(out.get_tables('Summary')))
1
>>> out = tbl.groupby('Origin').summary()
>>> print(list(out.keys()))
['ByGroupInfo', 'ByGroup1.Summary', 'ByGroup2.Summary', 'ByGroup3.Summary']
>>> print(len(out.get_tables('Summary')))
3