def trim(self, *conditions):
conditions = list(conditions)<EOL>for n in range(len(conditions)):<EOL><INDENT>if type(conditions[n]) is str:<EOL><INDENT>conditions[n] = self.execute_script(conditions[n])<EOL><DEDENT><DEDENT>new_databox = databox(delimiter=self.delimiter)<EOL>new_databox.copy_headers(self)<EOL>cs = _s.fun.trim_data_uber(self, conditions)<EOL>for n in range(len(cs)): new_databox.append_column(cs[n], self.ckeys[n])<EOL>return new_databox<EOL>
Removes data points not satisfying the supplied conditions. Conditions
can be truth arrays (having the same length as the columns!)
or scripted strings.

Example Workflow
----------------
d1 = spinmob.data.load()
d2 = d1.trim( (2<d1[0]) & (d1[0]<10) | (d1[3]==22), 'sin(d[2])*h("gain")<32.2')

Note this will not modify the databox, rather it will generate a new
one with the same header information and return it.