Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down
10 changes: 1 addition & 9 deletions pandas/tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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),
Expand Down