def __getitem__(self, item):
if isinstance(item, int):<EOL><INDENT>names = self.get_column_names()<EOL>return [self.evaluate(name, item, item+<NUM_LIT:1>)[<NUM_LIT:0>] for name in names]<EOL><DEDENT>elif isinstance(item, six.string_types):<EOL><INDENT>if hasattr(self, item) and isinstance(getattr(self, item), Expression):<EOL><INDENT>return getattr(self, item)<EOL><DEDENT>return Expression(self, item)  <EOL><DEDENT>elif isinstance(item, Expression):<EOL><INDENT>expression = item.expression<EOL>df = self.copy()<EOL>df.select(expression, name=FILTER_SELECTION_NAME, mode='<STR_LIT>')<EOL>return df<EOL><DEDENT>elif isinstance(item, (tuple, list)):<EOL><INDENT>df = self.copy(column_names=item)<EOL>return df<EOL><DEDENT>elif isinstance(item, slice):<EOL><INDENT>df = self.extract()<EOL>start, stop, step = item.start, item.stop, item.step<EOL>start = start or <NUM_LIT:0><EOL>stop = stop or len(df)<EOL>assert step in [None, <NUM_LIT:1>]<EOL>df.set_active_range(start, stop)<EOL>return df.trim()<EOL><DEDENT>
Convenient way to get expressions, (shallow) copies of a few columns, or to apply filtering.

        Example:

        >>> df['Lz']  # the expression 'Lz
        >>> df['Lz/2'] # the expression 'Lz/2'
        >>> df[["Lz", "E"]] # a shallow copy with just two columns
        >>> df[df.Lz < 0]  # a shallow copy with the filter Lz < 0 applied