Skip to content

Commit 065a1f9

Browse files
committed
squash: remove kwargs, add a bit of docstring
1 parent 9b52862 commit 065a1f9

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

pandas/io/pytables.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ def infer(self, handler):
16271627
new_self.read_metadata(handler)
16281628
return new_self
16291629

1630-
def convert(self, values, nan_rep, encoding, errors, **kwargs):
1630+
def convert(self, values, nan_rep, encoding, errors, start=None, stop=None):
16311631
""" set the values from this selection: take = take ownership """
16321632

16331633
# values is a recarray
@@ -1816,11 +1816,21 @@ class GenericIndexCol(IndexCol):
18161816
def is_indexed(self):
18171817
return False
18181818

1819-
def convert(self, values, nan_rep, encoding, errors, **kwargs):
1820-
""" set the values from this selection: take = take ownership """
1819+
def convert(self, values, nan_rep, encoding, errors, start=None, stop=None):
1820+
""" set the values from this selection: take = take ownership
1821+
1822+
Parameters
1823+
----------
1824+
1825+
start : int, optional
1826+
Table row number: the start of the sub-selection.
1827+
stop : int, optional
1828+
Table row number: the end of the sub-selection. Values larger than
1829+
the underlying table's row count are normalized to that.
1830+
"""
18211831

1822-
start = kwargs.get('start', 0)
1823-
stop = kwargs.get('stop', self.table.nrows)
1832+
start = start if start is not None else 0
1833+
stop = stop if stop is not None else self.table.nrows
18241834
stop = min(stop, self.table.nrows)
18251835
self.values = Int64Index(np.arange(stop - start))
18261836

@@ -2166,7 +2176,7 @@ def validate_attr(self, append):
21662176
raise ValueError("appended items dtype do not match existing "
21672177
"items dtype in table!")
21682178

2169-
def convert(self, values, nan_rep, encoding, errors, **kwargs):
2179+
def convert(self, values, nan_rep, encoding, errors, start=None, stop=None):
21702180
"""set the data from this selection (and convert to the correct dtype
21712181
if we can)
21722182
"""

0 commit comments

Comments
 (0)