Filter

Filter the dataset. Supports two types of filters:

  1. Comparison filters, which compare the values in a column with a value

  2. Advanced filters, which support full SQL strings for custom filtering logic

Parameters

NameTypeDescriptionIs Optional

items

filter_list

list of dictionaries representing filters

Example

ds = rasgo.get.dataset(74)

# comma separated list of 'WHERE' clauses
ds2 = ds.filter(items=['PRODUCTKEY < 500'])
ds2.preview()

# full filtering with a column, operator, and comparison value
ds3 = ds.filter(items=[{'column_name':'PRODUCTKEY', 'operator':'>', 'comparison_value':'101'}])
ds3.preview()

Source Code

Last updated