|
299 | 299 | If a filepath is provided for `filepath_or_buffer`, map the file object
|
300 | 300 | directly onto memory and access the data directly from there. Using this
|
301 | 301 | option can improve performance because there is no longer any I/O overhead.
|
302 |
| -float_precision : str, default None |
| 302 | +float_precision : str, optional |
303 | 303 | Specifies which converter the C engine should use for floating-point
|
304 | 304 | values. The options are `None` for the ordinary converter,
|
305 | 305 | `high` for the high-precision converter, and `round_trip` for the
|
306 | 306 | round-trip converter.
|
307 | 307 |
|
308 | 308 | Returns
|
309 | 309 | -------
|
310 |
| -result : DataFrame or TextParser""" |
| 310 | +DataFrame or TextParser |
| 311 | +
|
| 312 | +See Also |
| 313 | +-------- |
| 314 | +%s |
| 315 | +
|
| 316 | +Examples |
| 317 | +-------- |
| 318 | +%s # doctest: +SKI""" |
311 | 319 |
|
312 | 320 | # engine is not used in read_fwf() so is factored out of the shared docstring
|
313 | 321 | _engine_doc = """engine : {'c', 'python'}, optional
|
|
323 | 331 | will also force the use of the Python parsing engine. Note that regex
|
324 | 332 | delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'``.
|
325 | 333 | delimiter : str, default ``None``
|
326 |
| - Alternative argument name for sep. |
| 334 | + Alias for sep. |
327 | 335 | """
|
328 | 336 |
|
| 337 | +_see_also = ("to_csv : Write DataFrame to " |
| 338 | + "a comma-separated values (csv) file.") |
| 339 | + |
| 340 | +_example_doc = "pd.{_api}('/tmp/data.csv')" |
| 341 | + |
329 | 342 | _read_csv_doc = """
|
330 | 343 | Read CSV (comma-separated) file into DataFrame.
|
331 | 344 |
|
332 | 345 | %s
|
333 |
| -""" % (_parser_params % (_sep_doc.format(default="','"), _engine_doc)) |
| 346 | +""" % (_parser_params % (_sep_doc.format(default="','"), _engine_doc, |
| 347 | + _see_also, _example_doc.format(_api='read_csv'))) |
334 | 348 |
|
335 | 349 | _read_table_doc = """
|
336 | 350 | Read general delimited file into DataFrame.
|
|
340 | 354 |
|
341 | 355 | %s
|
342 | 356 | """ % (_parser_params % (_sep_doc.format(default="\\t (tab-stop)"),
|
343 |
| - _engine_doc)) |
| 357 | + _engine_doc, _see_also, |
| 358 | + _example_doc.format(_api='read_table'))) |
344 | 359 |
|
345 | 360 | _fwf_widths = """\
|
346 | 361 | colspecs : list of pairs (int, int) or 'infer'. optional
|
|
362 | 377 | Read a table of fixed-width formatted lines into DataFrame.
|
363 | 378 |
|
364 | 379 | %s
|
365 |
| -""" % (_parser_params % (_fwf_widths, '')) |
| 380 | +""" % (_parser_params % (_fwf_widths, '', _see_also, |
| 381 | + _example_doc.format(_api='read_fwf'))) |
366 | 382 |
|
367 | 383 |
|
368 | 384 | def _validate_integer(name, val, min_val=0):
|
|
0 commit comments