Lambda functions in python (and why they improve your coding skills)

preview_player
Показать описание
I am using lambda expressions in my Python for finance videos pretty often so here is an explanation how those functions are working.
Lambda functions as said are reducing the lines of code and improving your code readability as they are clearly defined where they are actually executed - a difference to normal functions.
For Data Science lambda functions are important as you are able to perform complex functions on single values in a data frame using Pandas apply or aggregate function.

#Python #lambda
Рекомендации по теме
Комментарии
Автор

Really enjoy learning python from your videos! Thanks for the effort!

mainsg
Автор

This is one drawback of Python, that lambdas are crippled compared to regular functions (only one expression in the body, no statements allowed). In other languages (e.g. LISP, JavaScript), a “lambda” is just the same as a regular function, only it doesn’t have a name.

lawrencedoliveiro