Skip to content

Commit 4091f64

Browse files
authored
CLN: Drop the skip_footer parameter in read_csv (pandas-dev#18724)
Deprecated back in 0.19.0. xref pandas-devgh-13386.
1 parent 8e34ec8 commit 4091f64

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

doc/source/io.rst

-4
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ skiprows : list-like or integer, default ``None``
198198
199199
skipfooter : int, default ``0``
200200
Number of lines at bottom of file to skip (unsupported with engine='c').
201-
skip_footer : int, default ``0``
202-
.. deprecated:: 0.19.0
203-
204-
Use the ``skipfooter`` parameter instead, as they are identical
205201

206202
nrows : int, default ``None``
207203
Number of rows of file to read. Useful for reading pieces of large files.

doc/source/whatsnew/v0.22.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Removal of prior version deprecations/changes
219219
- The ``freq`` and ``how`` parameters have been removed from the ``rolling``/``expanding``/``ewm`` methods of DataFrame
220220
and Series (deprecated since v0.18). Instead, resample before calling the methods. (:issue:18601 & :issue:18668)
221221
- ``DatetimeIndex.to_datetime``, ``Timestamp.to_datetime``, ``PeriodIndex.to_datetime``, and ``Index.to_datetime`` have been removed (:issue:`8254`, :issue:`14096`, :issue:`14113`)
222+
- :func:`read_csv` has dropped the ``skip_footer`` parameter (:issue:`13386`)
222223

223224
.. _whatsnew_0220.performance:
224225

pandas/io/parsers.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@
148148
An example of a valid callable argument would be ``lambda x: x in [0, 2]``.
149149
skipfooter : int, default 0
150150
Number of lines at bottom of file to skip (Unsupported with engine='c')
151-
skip_footer : int, default 0
152-
.. deprecated:: 0.19.0
153-
Use the `skipfooter` parameter instead, as they are identical
154151
nrows : int, default None
155152
Number of rows of file to read. Useful for reading pieces of large files
156153
na_values : scalar, str, list-like, or dict, default None
@@ -613,7 +610,6 @@ def parser_f(filepath_or_buffer,
613610
warn_bad_lines=True,
614611

615612
skipfooter=0,
616-
skip_footer=0, # deprecated
617613

618614
# Internal
619615
doublequote=True,
@@ -641,13 +637,6 @@ def parser_f(filepath_or_buffer,
641637
engine = 'c'
642638
engine_specified = False
643639

644-
if skip_footer != 0:
645-
warnings.warn("The 'skip_footer' argument has "
646-
"been deprecated and will be removed "
647-
"in a future version. Please use the "
648-
"'skipfooter' argument instead.",
649-
FutureWarning, stacklevel=2)
650-
651640
kwds = dict(delimiter=delimiter,
652641
engine=engine,
653642
dialect=dialect,
@@ -682,7 +671,7 @@ def parser_f(filepath_or_buffer,
682671
nrows=nrows,
683672
iterator=iterator,
684673
chunksize=chunksize,
685-
skipfooter=skipfooter or skip_footer,
674+
skipfooter=skipfooter,
686675
converters=converters,
687676
dtype=dtype,
688677
usecols=usecols,

pandas/tests/io/parser/test_unsupported.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,11 @@ class TestDeprecatedFeatures(object):
137137
{"use_unsigned": True},
138138
{"use_unsigned": False},
139139
{"tupleize_cols": True},
140-
{"tupleize_cols": False},
141-
{"skip_footer": 1}])
140+
{"tupleize_cols": False}])
142141
def test_deprecated_args(self, engine, kwargs):
143142
data = "1,2,3"
144143
arg, _ = list(kwargs.items())[0]
145144

146-
if engine == "c" and arg == "skip_footer":
147-
# unsupported --> exception is raised
148-
return
149-
150145
if engine == "python" and arg == "buffer_lines":
151146
# unsupported --> exception is raised
152147
return

0 commit comments

Comments
 (0)