@@ -66,16 +66,13 @@ The pandas I/O API is a set of top level ``reader`` functions accessed like
66
66
CSV & Text files
67
67
----------------
68
68
69
- The two workhorse functions for reading text files (a.k.a. flat files) are
70
- :func: `read_csv ` and :func: `read_table `. They both use the same parsing code to
71
- intelligently convert tabular data into a ``DataFrame `` object. See the
72
- :ref: `cookbook<cookbook.csv> ` for some advanced strategies.
69
+ The workhorse function for reading text files (a.k.a. flat files) is
70
+ :func: `read_csv `. See the :ref: `cookbook<cookbook.csv> ` for some advanced strategies.
73
71
74
72
Parsing options
75
73
'''''''''''''''
76
74
77
- The functions :func: `read_csv ` and :func: `read_table ` accept the following
78
- common arguments:
75
+ :func: `read_csv ` accepts the following common arguments:
79
76
80
77
Basic
81
78
+++++
@@ -780,8 +777,8 @@ Date Handling
780
777
Specifying Date Columns
781
778
+++++++++++++++++++++++
782
779
783
- To better facilitate working with datetime data, :func: `read_csv ` and
784
- :func: ` read_table ` use the keyword arguments ``parse_dates `` and ``date_parser ``
780
+ To better facilitate working with datetime data, :func: `read_csv `
781
+ uses the keyword arguments ``parse_dates `` and ``date_parser ``
785
782
to allow users to specify a variety of columns and date/time formats to turn the
786
783
input text data into ``datetime `` objects.
787
784
@@ -1434,7 +1431,7 @@ Suppose you have data indexed by two columns:
1434
1431
1435
1432
print (open (' data/mindex_ex.csv' ).read())
1436
1433
1437
- The ``index_col `` argument to ``read_csv `` and `` read_table `` can take a list of
1434
+ The ``index_col `` argument to ``read_csv `` can take a list of
1438
1435
column numbers to turn multiple columns into a ``MultiIndex `` for the index of the
1439
1436
returned object:
1440
1437
@@ -1505,8 +1502,8 @@ class of the csv module. For this, you have to specify ``sep=None``.
1505
1502
1506
1503
.. ipython :: python
1507
1504
1508
- print (open (' tmp2.sv' ).read())
1509
- pd.read_csv(' tmp2.sv' , sep = None , engine = ' python' )
1505
+ print (open (' tmp2.sv' ).read())
1506
+ pd.read_csv(' tmp2.sv' , sep = None , engine = ' python' )
1510
1507
1511
1508
.. _io.multiple_files :
1512
1509
@@ -1528,16 +1525,16 @@ rather than reading the entire file into memory, such as the following:
1528
1525
.. ipython :: python
1529
1526
1530
1527
print (open (' tmp.sv' ).read())
1531
- table = pd.read_table (' tmp.sv' , sep = ' |' )
1528
+ table = pd.read_csv (' tmp.sv' , sep = ' |' )
1532
1529
table
1533
1530
1534
1531
1535
- By specifying a ``chunksize `` to ``read_csv `` or `` read_table `` , the return
1532
+ By specifying a ``chunksize `` to ``read_csv ``, the return
1536
1533
value will be an iterable object of type ``TextFileReader ``:
1537
1534
1538
1535
.. ipython :: python
1539
1536
1540
- reader = pd.read_table (' tmp.sv' , sep = ' |' , chunksize = 4 )
1537
+ reader = pd.read_csv (' tmp.sv' , sep = ' |' , chunksize = 4 )
1541
1538
reader
1542
1539
1543
1540
for chunk in reader:
@@ -1548,7 +1545,7 @@ Specifying ``iterator=True`` will also return the ``TextFileReader`` object:
1548
1545
1549
1546
.. ipython :: python
1550
1547
1551
- reader = pd.read_table (' tmp.sv' , sep = ' |' , iterator = True )
1548
+ reader = pd.read_csv (' tmp.sv' , sep = ' |' , iterator = True )
1552
1549
reader.get_chunk(5 )
1553
1550
1554
1551
.. ipython :: python
@@ -3067,7 +3064,7 @@ Clipboard
3067
3064
3068
3065
A handy way to grab data is to use the :meth: `~DataFrame.read_clipboard ` method,
3069
3066
which takes the contents of the clipboard buffer and passes them to the
3070
- ``read_table `` method. For instance, you can copy the following text to the
3067
+ ``read_csv `` method. For instance, you can copy the following text to the
3071
3068
clipboard (CTRL-C on many operating systems):
3072
3069
3073
3070
.. code-block :: python
0 commit comments