Shopify interview question

Implement a Datasource class that looks like a Pandas dataframe. You should be able to map and filter over it, before collecting the results: Datasource([1, 2, 3]).map(lambda x: x*2).filter(lambda x: x%2 == 0).collect()