|
78 | 78 |
|
79 | 79 | filepath_or_buffer : various
|
80 | 80 | Either a path to a file (a :class:`python:str`, :class:`python:pathlib.Path`,
|
81 |
| - or :class:`py:py._path.local.LocalPath`), URL (including http, ftp, and S3 |
| 81 | + or :class:`py:py._path.local.LocalPath`), URL (including http, ftp, hdfs, and S3 |
82 | 82 | locations), or any object with a ``read()`` method (such as an open file or
|
83 | 83 | :class:`~python:io.StringIO`).
|
84 | 84 | sep : str, defaults to ``','`` for :func:`read_csv`, ``\t`` for :func:`read_table`
|
@@ -1579,6 +1579,12 @@ You can pass in a URL to a CSV file:
|
1579 | 1579 | df = pd.read_csv('https://download.bls.gov/pub/time.series/cu/cu.item',
|
1580 | 1580 | sep='\t')
|
1581 | 1581 |
|
| 1582 | +Or a hdfs URL: |
| 1583 | + |
| 1584 | +.. code-block:: python |
| 1585 | +
|
| 1586 | + df = pd.read_csv('hdfs://<nodenamehost>:<nodenameport>/pandas-test/tips.csv') |
| 1587 | +
|
1582 | 1588 | S3 URLs are handled as well:
|
1583 | 1589 |
|
1584 | 1590 | .. code-block:: python
|
@@ -1849,7 +1855,7 @@ The parser will try to parse a ``DataFrame`` if ``typ`` is not supplied or
|
1849 | 1855 | is ``None``. To explicitly force ``Series`` parsing, pass ``typ=series``
|
1850 | 1856 |
|
1851 | 1857 | - ``filepath_or_buffer`` : a **VALID** JSON string or file handle / StringIO. The string could be
|
1852 |
| - a URL. Valid URL schemes include http, ftp, S3, and file. For file URLs, a host |
| 1858 | + a URL. Valid URL schemes include http, ftp, hdfs, S3, and file. For file URLs, a host |
1853 | 1859 | is expected. For instance, a local file could be
|
1854 | 1860 | file ://localhost/path/to/table.json
|
1855 | 1861 | - ``typ`` : type of object to recover (series or frame), default 'frame'
|
|
0 commit comments