Skip to content

Commit a7df686

Browse files
committed
added Parameters to docstrings in pandas/io/formats/latex.py (pandas-dev#25436)
1 parent 3eb433b commit a7df686

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

pandas/io/formats/latex.py

+43-7
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,19 @@ def _print_cline(self, buf, i, icol):
240240

241241
def _write_tabular_begin(self, buf, column_format):
242242
"""
243-
write the beginning of a tabular environment or
244-
nested table/tabular environments including caption and label
243+
Write the beginning of a tabular environment or
244+
nested table/tabular environments including caption and label.
245+
246+
Parameters
247+
----------
248+
buf : string or file handle
249+
File path or object. If not specified, the result is returned as
250+
a string.
251+
column_format : str, default None
252+
The columns format as specified in `LaTeX table format
253+
<https://en.wikibooks.org/wiki/LaTeX/Tables>`__ e.g 'rcl'
254+
for 3 columns
255+
245256
"""
246257
if self.caption is None and self.label is None:
247258
# then write output only in a tabular environment
@@ -267,8 +278,19 @@ def _write_tabular_begin(self, buf, column_format):
267278

268279
def _write_longtable_begin(self, buf, column_format):
269280
"""
270-
write the beginning of a longtable environment including caption and
271-
label if provided by user
281+
Write the beginning of a longtable environment including caption and
282+
label if provided by user.
283+
284+
Parameters
285+
----------
286+
buf : string or file handle
287+
File path or object. If not specified, the result is returned as
288+
a string.
289+
column_format : str, default None
290+
The columns format as specified in `LaTeX table format
291+
<https://en.wikibooks.org/wiki/LaTeX/Tables>`__ e.g 'rcl'
292+
for 3 columns
293+
272294
"""
273295
buf.write('\\begin{{longtable}}{{{fmt}}}\n'.format(fmt=column_format))
274296

@@ -292,8 +314,15 @@ def _write_longtable_begin(self, buf, column_format):
292314

293315
def _write_tabular_end(self, buf):
294316
"""
295-
write the end of a tabular environment or nested table/tabular
296-
environment
317+
Write the end of a tabular environment or nested table/tabular
318+
environment.
319+
320+
Parameters
321+
----------
322+
buf : string or file handle
323+
File path or object. If not specified, the result is returned as
324+
a string.
325+
297326
"""
298327
buf.write('\\bottomrule\n')
299328
buf.write('\\end{tabular}\n')
@@ -305,6 +334,13 @@ def _write_tabular_end(self, buf):
305334
@staticmethod
306335
def _write_longtable_end(buf):
307336
"""
308-
write the end of a longtable environment
337+
Write the end of a longtable environment.
338+
339+
Parameters
340+
----------
341+
buf : string or file handle
342+
File path or object. If not specified, the result is returned as
343+
a string.
344+
309345
"""
310346
buf.write('\\end{longtable}\n')

0 commit comments

Comments
 (0)