Skip to content

Commit 3f8937f

Browse files
committed
Docstring tweaks
1 parent 6c2c11a commit 3f8937f

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

pandas/io/html.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def parse_tables(self):
214214
215215
Returns
216216
-------
217-
tables : list of parsed (header, body, footer) tuples from tables
217+
list of parsed (header, body, footer) tuples from tables.
218218
"""
219219
tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
220220
return (self._parse_thead_tbody_tfoot(table) for table in tables)
@@ -233,7 +233,7 @@ def _attr_getter(self, obj, attr):
233233
234234
Returns
235235
-------
236-
text : str or unicode
236+
str or unicode
237237
The attribute value.
238238
"""
239239
raise com.AbstractMethodError(self)
@@ -264,7 +264,7 @@ def _parse_td(self, obj):
264264
265265
Returns
266266
-------
267-
columns : list of node-like
267+
list of node-like
268268
These are the elements of each row, i.e., the columns.
269269
"""
270270
raise com.AbstractMethodError(self)
@@ -279,7 +279,8 @@ def _parse_thead_tr(self, table):
279279
280280
Returns
281281
-------
282-
rows : list of <tr> row elements of a table
282+
list of node-like
283+
These are the <tr> row elements of a table.
283284
"""
284285
raise com.AbstractMethodError(self)
285286

@@ -297,7 +298,8 @@ def _parse_tbody_tr(self, table):
297298
298299
Returns
299300
-------
300-
rows : list of <tr> row elements of a table
301+
list of node-like
302+
These are the <tr> row elements of a table.
301303
"""
302304
raise com.AbstractMethodError(self)
303305

@@ -311,7 +313,8 @@ def _parse_tfoot_tr(self, table):
311313
312314
Returns
313315
-------
314-
rows : list of <tr> row elements of a table
316+
list of node-like
317+
These are the <tr> row elements of a table.
315318
"""
316319
raise com.AbstractMethodError(self)
317320

@@ -336,7 +339,8 @@ def _parse_tables(self, doc, match, attrs):
336339
337340
Returns
338341
-------
339-
tables : list of HTML <table> elements to be parsed into raw data.
342+
list of node-like
343+
HTML <table> elements to be parsed into raw data.
340344
"""
341345
raise com.AbstractMethodError(self)
342346

@@ -354,8 +358,8 @@ def _equals_tag(self, obj, tag):
354358
355359
Returns
356360
-------
357-
is_tag_equal : boolean
358-
boolean indicating if the object is equal to tag 'tag'
361+
boolean
362+
Whether the object is equal to tag 'tag'
359363
"""
360364
raise com.AbstractMethodError(self)
361365

@@ -365,7 +369,8 @@ def _build_doc(self):
365369
366370
Returns
367371
-------
368-
obj : the DOM from which to parse the table element.
372+
node-like
373+
The DOM from which to parse the table element.
369374
"""
370375
raise com.AbstractMethodError(self)
371376

@@ -390,7 +395,7 @@ def _parse_thead_tbody_tfoot(self, table_html):
390395
391396
Returns
392397
-------
393-
tuple of (header, body, footer)
398+
tuple of (header, body, footer), each a list of list-of-text rows.
394399
"""
395400

396401
header_rows = self._parse_thead_tr(table_html)
@@ -432,7 +437,8 @@ def _expand_colspan_rowspan(self, rows):
432437
433438
Returns
434439
-------
435-
res : list of rows, each of which is a list of str in that row
440+
list of list
441+
Each returned row is a list of str text.
436442
"""
437443

438444
all_texts = [] # list of rows, each a list of str
@@ -501,14 +507,14 @@ def _handle_hidden_tables(self, tbl_list, attr_name):
501507
502508
Parameters
503509
----------
504-
tbl_list : list of Tag or list of Element
510+
tbl_list : list of node-like
505511
Type of list elements will vary depending upon parser used
506512
attr_name : str
507513
Name of the accessor for retrieving HTML attributes
508514
509515
Returns
510516
-------
511-
list of Tag or list of Element
517+
list of node-like
512518
Return type matches `tbl_list`
513519
"""
514520
if not self.displayed_only:

0 commit comments

Comments
 (0)