summaryrefslogtreecommitdiff
path: root/tablib
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2010-10-10 04:37:09 -0400
committerKenneth Reitz <me@kennethreitz.com>2010-10-10 04:37:09 -0400
commit7fda829d275c1375d7399f2c9234e0bf0093dbc3 (patch)
treec14a566da2ab6ecdc5fc183066177cc9b622e5d7 /tablib
parentca08ac8a7bd8eed94e1aa186a9530be728c1dca7 (diff)
downloadtablib-7fda829d275c1375d7399f2c9234e0bf0093dbc3.tar.gz
Documentation update.
Diffstat (limited to 'tablib')
-rw-r--r--tablib/core.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tablib/core.py b/tablib/core.py
index 3bfc312..6e5e60b 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -96,7 +96,9 @@ class Dataset(object):
def __delitem__(self, key):
if isinstance(key, basestring):
+
if key in self.headers:
+
pos = self.headers.index(key)
del self.headers[pos]
@@ -352,9 +354,11 @@ class Dataset(object):
You can also add a column of a single callable object, which will
add a new column with the return values of the callable each as an
- item in the column. ::
+ item in the column. The callable can be written to perform calculations
+ on the current row. The callable receives a tuple representation of
+ the current data row as the first parameter. ::
- data.append(col=random.randint)
+ data.append(col=[random.choice])
"""
if row is not None:
self._validate(row)