Skip to content

Commit 529c70f

Browse files
committed
DEPR: pd.read_table
- pd.read_table is deprecated and replaced by pd.read_csv - added whatsnew note
1 parent 537b65c commit 529c70f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/source/whatsnew/v0.24.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ Deprecations
319319
- :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`).
320320
- :meth:`MultiIndex.to_hierarchical` is deprecated and will be removed in a future version (:issue:`21613`)
321321
- :meth:`Series.ptp` is deprecated. Use ``numpy.ptp`` instead (:issue:`21614`)
322+
- :func:`pandas.read_table` is deprecated. Use ``pandas.read_csv`` instead (:issue:`21948`)
322323
-
323324

324325
.. _whatsnew_0240.prior_deprecations:

pandas/io/parsers.py

+9
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@
326326
""" % (_parser_params % (_sep_doc.format(default="','"), _engine_doc))
327327

328328
_read_table_doc = """
329+
330+
.. deprecated:: 0.24.0
331+
Use :func:`pandas.read_csv` instead, passing `sep='\t'` if necessary.
332+
329333
Read general delimited file into DataFrame
330334
331335
%s
@@ -606,6 +610,11 @@ def parser_f(filepath_or_buffer,
606610
memory_map=False,
607611
float_precision=None):
608612

613+
if name == "read_table":
614+
warnings.warn("read_table is deprecated, use read_csv instead. "
615+
"Note that the default value of sep is different.",
616+
FutureWarning, stacklevel=2)
617+
609618
# Alias sep -> delimiter.
610619
if delimiter is None:
611620
delimiter = sep

0 commit comments

Comments
 (0)