From 5fbdd56fba67b259a2bee7979b20fbbd9a31dc63 Mon Sep 17 00:00:00 2001 From: rabinnankhwa Date: Sun, 31 Aug 2014 00:12:44 +0545 Subject: [PATCH] filter row and column values --- tablib/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tablib/core.py b/tablib/core.py index 3fc55cb..48758bd 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -948,6 +948,10 @@ class Dataset(object): if cols is None: cols = list(self.headers) + #filter out impossible rows and columns + rows = [row for row in rows if row in range(self.height)] + cols = [header for header in cols if header in self.headers] + _dset = Dataset() #filtering rows and columns