We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Talks - Valerio Maggio: Pythonic `functional` (`iter`)tools for your data challenges
Discover how to harness the power of Python's built-in functional programming tools, including `functools`, `itertools`, and `operator`, to simplify your data challenges and write more efficient code.
-
Python’s built-in
functoolsmodule provides several useful functions for working with iterables and iterators. -
The
reducefunction is a powerful tool for aggregating the values of an iterable, and can be used to implement many common algorithms, such as summing a list of numbers. -
The
mapfunction is used to apply a given function to each item of an iterable, and can be used to perform complex operations on data. -
The
filterfunction is used to filter out elements of an iterable that do not meet a certain condition, and can be used to simplify complex logic. -
The
zipfunction is used to combine multiple iterables into a single iterable of tuples, and can be used to process multiple data streams together. -
Python’s
itertoolsmodule provides a variety of functions for working with iterators, includingcycle,permutations, andcombinations. -
The
groupbyfunction is used to group consecutive items of an iterable according to a common attribute, and can be used to process data that has been grouped together in a certain way. -
The
imapandifilterfunctions are used to apply a given function to each item of an iterable, but only process the output if the function returns a truthy value. -
The
ifilterfalsefunction is used to inverse the behavior of thefilterfunction, and can be used to include elements in the output that are filtered out by default. -
Python’s
operatormodule provides several useful functions for working with operators, includingattrgetter,itemgetter, andmethodcaller. -
The
attrgetterfunction is used to create a function that can be used to access the value of an attribute of an object, and can be used to simplify complex code that relies on object attributes. -
The
itemgetterfunction is used to create a function that can be used to access the value of an item of a sequence, and can be used to simplify complex code that relies on sequence items. -
The
methodcallerfunction is used to create a function that can be used to call a method of an object, and can be used to simplify complex code that relies on method calls.