diff --git a/doc/source/io.rst b/doc/source/io.rst index 54e7a11c5f2b1..370d9a96ee9ae 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -198,10 +198,6 @@ skiprows : list-like or integer, default ``None`` skipfooter : int, default ``0`` Number of lines at bottom of file to skip (unsupported with engine='c'). -skip_footer : int, default ``0`` - .. deprecated:: 0.19.0 - - Use the ``skipfooter`` parameter instead, as they are identical nrows : int, default ``None`` Number of rows of file to read. Useful for reading pieces of large files. diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 2ea44722d343d..c2da0c420f643 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -219,6 +219,7 @@ Removal of prior version deprecations/changes - The ``freq`` and ``how`` parameters have been removed from the ``rolling``/``expanding``/``ewm`` methods of DataFrame and Series (deprecated since v0.18). Instead, resample before calling the methods. (:issue:18601 & :issue:18668) - ``DatetimeIndex.to_datetime``, ``Timestamp.to_datetime``, ``PeriodIndex.to_datetime``, and ``Index.to_datetime`` have been removed (:issue:`8254`, :issue:`14096`, :issue:`14113`) +- :func:`read_csv` has dropped the ``skip_footer`` parameter (:issue:`13386`) .. _whatsnew_0220.performance: diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index a04d77de08950..927edbf236366 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -148,9 +148,6 @@ An example of a valid callable argument would be ``lambda x: x in [0, 2]``. skipfooter : int, default 0 Number of lines at bottom of file to skip (Unsupported with engine='c') -skip_footer : int, default 0 - .. deprecated:: 0.19.0 - Use the `skipfooter` parameter instead, as they are identical nrows : int, default None Number of rows of file to read. Useful for reading pieces of large files na_values : scalar, str, list-like, or dict, default None @@ -613,7 +610,6 @@ def parser_f(filepath_or_buffer, warn_bad_lines=True, skipfooter=0, - skip_footer=0, # deprecated # Internal doublequote=True, @@ -641,13 +637,6 @@ def parser_f(filepath_or_buffer, engine = 'c' engine_specified = False - if skip_footer != 0: - warnings.warn("The 'skip_footer' argument has " - "been deprecated and will be removed " - "in a future version. Please use the " - "'skipfooter' argument instead.", - FutureWarning, stacklevel=2) - kwds = dict(delimiter=delimiter, engine=engine, dialect=dialect, @@ -682,7 +671,7 @@ def parser_f(filepath_or_buffer, nrows=nrows, iterator=iterator, chunksize=chunksize, - skipfooter=skipfooter or skip_footer, + skipfooter=skipfooter, converters=converters, dtype=dtype, usecols=usecols, diff --git a/pandas/tests/io/parser/test_unsupported.py b/pandas/tests/io/parser/test_unsupported.py index 189a113bb6abb..ab5d8a7595c96 100644 --- a/pandas/tests/io/parser/test_unsupported.py +++ b/pandas/tests/io/parser/test_unsupported.py @@ -137,16 +137,11 @@ class TestDeprecatedFeatures(object): {"use_unsigned": True}, {"use_unsigned": False}, {"tupleize_cols": True}, - {"tupleize_cols": False}, - {"skip_footer": 1}]) + {"tupleize_cols": False}]) def test_deprecated_args(self, engine, kwargs): data = "1,2,3" arg, _ = list(kwargs.items())[0] - if engine == "c" and arg == "skip_footer": - # unsupported --> exception is raised - return - if engine == "python" and arg == "buffer_lines": # unsupported --> exception is raised return