def __getitem__(self, i):
    if isinstance(i, six.string_types):
        return self._name_to_column_map[i]
    elif isinstance(i, (int, long)):
        return self._columns[i]
    else:
        raise TypeError()
def __getitem__(self, i):
    if isinstance(i, six.string_types):
        return self._name_to_column_map[i]
    elif isinstance(i, (int, long)):
        return self._columns[i]
    else:
        raise TypeError()