Skip to content

Commit

Permalink
DEPR: pd.read_table
Browse files Browse the repository at this point in the history
- pd.read_table is deprecated and replaced by pd.read_csv
- added whatsnew note
  • Loading branch information
dahlbaek committed Jul 17, 2018
1 parent 537b65c commit 529c70f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ Deprecations
- :meth:`DataFrame.to_stata`, :meth:`read_stata`, :class:`StataReader` and :class:`StataWriter` have deprecated the ``encoding`` argument. The encoding of a Stata dta file is determined by the file type and cannot be changed (:issue:`21244`).
- :meth:`MultiIndex.to_hierarchical` is deprecated and will be removed in a future version (:issue:`21613`)
- :meth:`Series.ptp` is deprecated. Use ``numpy.ptp`` instead (:issue:`21614`)
- :func:`pandas.read_table` is deprecated. Use ``pandas.read_csv`` instead (:issue:`21948`)
-

.. _whatsnew_0240.prior_deprecations:
Expand Down
9 changes: 9 additions & 0 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@
""" % (_parser_params % (_sep_doc.format(default="','"), _engine_doc))

_read_table_doc = """
.. deprecated:: 0.24.0
Use :func:`pandas.read_csv` instead, passing `sep='\t'` if necessary.
Read general delimited file into DataFrame
%s
Expand Down Expand Up @@ -606,6 +610,11 @@ def parser_f(filepath_or_buffer,
memory_map=False,
float_precision=None):

if name == "read_table":
warnings.warn("read_table is deprecated, use read_csv instead. "
"Note that the default value of sep is different.",
FutureWarning, stacklevel=2)

# Alias sep -> delimiter.
if delimiter is None:
delimiter = sep
Expand Down

0 comments on commit 529c70f

Please sign in to comment.