summaryrefslogtreecommitdiff
path: root/tablib/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tablib/core.py')
-rw-r--r--tablib/core.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tablib/core.py b/tablib/core.py
index 7e78b56..0429136 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -175,7 +175,6 @@ class Dataset(object):
else:
return [result.tuple for result in _results]
-
def __setitem__(self, key, value):
self._validate(value)
self._data[key] = Row(value)
@@ -695,6 +694,12 @@ class Dataset(object):
self.rpush_col(col, header)
+ def get_col(self, index):
+ """Returns the column from the :class:`Dataset` at the given index."""
+
+ return [row[index] for row in self._data]
+
+
# ----
# Misc
# ----