10
08 '15
import pandas as pd from functools import reduce Map in bare Python a = [1,2,3,4,5] list(map(lambda x: x**2, a)) [1, 4, 9, 16, 25] list(filter(lambda x: x >= 4, a)) [4, 5] reduce(lambda x,y: x*y, a) 120 b = range(1000) %timeit list(map(lambda x: x**2, b)) 1000 loops, best of 3: 579 µs per loop %timeit…