```
import pandas as pd
class DS:
def __init__(self, ds):
self.ds = ds
self._row = []
self._col = []
def show(self):
if not self._row and not self._col:
return self.ds.loc[:,:]
elif not self._row and self._col:
return self.ds.loc[:,self._col]
elif self._row and not self._col:
return self.ds.loc[self._row,:]
else:
return self.ds.loc[self._row,self._col]
def col(self, *cnames):
for cname in cnames:
if cname not in self._col:
self._col.append(cname)
return self
def where(self, fn):
self.ds = self.ds.loc[fn(self.ds),:]
return self
boston = pd.read_csv("C:\data/boston.csv")
(
DS(boston)
.where(lambda x: ~x["price"].between(10, 30))
.show()
)
```