#!/usr/bin/env python # coding: utf-8 # In[1]: from siuba.dply.verbs import Var, VarList, var_select from siuba import _ import pandas as pd from pandas import DataFrame, Series # ## exclusion # In[2]: v = VarList() colnames = ['a', 'b', 'c', 'd'] var_select( colnames, v.x == v.a, -v.d, ) # ## methods # In[3]: colnames = ["home_phone", "home_address", "other", "misc"] var_select( colnames, v.startswith("home"), v.misc ) # ## slicing # In[4]: colnames = ["home_phone", "home_address", "other", "misc"] var_select( colnames, v[v.home_phone:v.home_address] ) # ## misc # In[5]: f = _.startswith("a") f(v)