swat.cas.results.CASResults.get_group

CASResults.get_group(*name, **kwargs)

Return a CASResults object of the specified By group tables

Parameters:
name : string or tuple-of-strings, optional

The values of the By variable to choose.

**kwargs : any, optional

Key / value pairs containing the variable name and value of the desired By group.

Returns:
CASResults

Examples

>>> conn = swat.CAS()
>>> tbl = conn.read_csv('data/cars.csv')
>>> out = tbl.groupby(['Origin', 'Cylinders']).summary()

Specify the By group values (in order).

>>> print(out.get_group(('Asia', 4)))

Or, specify the By group values as keyword parameters.

>>> print(out.get_group(Origin='Asia', Cylinders=4))