diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 7e201920f4331..332b435d33403 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -5,7 +5,7 @@ Cross-compatible functions for different versions of Python. Key items to import for compatible code: -* lists: lrange(), lmap(), lzip(), lfilter() +* lists: lrange(), lmap(), lzip() * add_metaclass(metaclass) - class decorator that recreates class with with the given metaclass instead (and avoids intermediary class creation) @@ -35,10 +35,6 @@ def lmap(*args, **kwargs): return list(map(*args, **kwargs)) -def lfilter(*args, **kwargs): - return list(filter(*args, **kwargs)) - - # ---------------------------------------------------------------------------- # functions largely based / taken from the six module diff --git a/pandas/tests/test_compat.py b/pandas/tests/test_compat.py index 654de06082363..fd0ae85ce634f 100644 --- a/pandas/tests/test_compat.py +++ b/pandas/tests/test_compat.py @@ -5,7 +5,7 @@ import builtins import re -from pandas.compat import lfilter, lmap, lrange, lzip, re_type +from pandas.compat import lmap, lrange, lzip, re_type class TestBuiltinIterators(object): @@ -35,14 +35,6 @@ def test_lmap(self): lengths = 10, self.check_results(results, expecteds, lengths) - def test_lfilter(self): - func = lambda x: x - lst = list(builtins.range(10)) - results = lfilter(lambda x: x, lst), - lengths = 9, - expecteds = list(builtins.filter(func, lst)), - self.check_results(results, expecteds, lengths) - def test_lzip(self): lst = [builtins.range(10), builtins.range(10), builtins.range(10)] results = lzip(*lst),