Filter Python Lists with Lambda
Uses lambda to filter the original list so only values over 14 are included in the new iterable. Note: the created iterable is converted back into a list.
original_list = [11, 13, 15, 17] filtered_list = list(filter(lambda x: x > 14, original_list)) >> [15, 17]
By detro - Last Updated Oct. 30, 2021, 1:24 p.m.
Using a Python Decorator to Print Memory Usage of a DataFrame