Тёмный

Map, Filter, and Reduce Functions || Python Tutorial || Learn Python Programming 

Socratica
Подписаться 882 тыс.
Просмотров 600 тыс.
50% 1

𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python The map, filter, and reduce functions simplify the job of working with lists. In this lesson, we show you how to use each function. If you also use lambda expressions, you can accomplish a great deal in a single line of code!
This video was made possible with the help of our Patrons on Patreon! We would especially like to recognize the generosity of our VIP Patron, Carlos A. We are so happy you are on the Socratica Team, Carlos!
To learn Python, start our Python Playlist HERE:
bit.ly/PythonHelloWorld
Subscribe to Socratica: bit.ly/1ixuu9W
♦♦♦♦♦♦♦♦♦♦
We recommend:
Python Cookbook, Third edition from O’Reilly
amzn.to/2sCNYlZ
The Mythical Man Month - Essays on Software Engineering & Project Management
amzn.to/2tYdNeP
Shop Amazon Used Textbooks - Save up to 90%
amzn.to/2pllk4B
♦♦♦♦♦♦♦♦♦♦
Ways to support our channel:
► Join our Patreon : / socratica
► Make a one-time PayPal donation: www.paypal.me/socratica
► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!
♦♦♦♦♦♦♦♦♦♦
Connect with us!
Facebook: / socraticastudios
Instagram: / socraticastudios
Twitter: / socratica
♦♦♦♦♦♦♦♦♦♦
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison (@mlh496 on Twitter)
♦♦♦♦♦♦♦♦♦♦

Опубликовано:

 

17 сен 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 576   
@Socratica
@Socratica 2 года назад
Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica
@5cyndi
@5cyndi 3 дня назад
We love the Python T-shirts! I got one for me and one for a loved one and I wear it to work some days (we use Python and my colleagues “get” it).
@kailashprasad1137
@kailashprasad1137 6 лет назад
Python should be a comedian because it is full of one liners.
@abbysands9510
@abbysands9510 6 лет назад
lol
@Chiramisudo
@Chiramisudo 6 лет назад
A Map, a Filter, and a Reduce walk into a compiler... >.< Ugh! Obviously I should NOT be a comedian, lol.
@practicecomputing8506
@practicecomputing8506 5 лет назад
1:40 "If brevity is the soul of wit, then python is in a class by itself"
@JoeWong81
@JoeWong81 5 лет назад
The language itself was named after monty python
@salyoshkin
@salyoshkin 5 лет назад
Still too long. What in python you write in 1 line, in R you do in couple of symbols
@Socratica
@Socratica 4 года назад
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
@veeramahendranagency2823
@veeramahendranagency2823 4 года назад
Smile pls
@veeramahendranagency2823
@veeramahendranagency2823 4 года назад
@Stimpy&Ren ok
@sssfasih
@sssfasih 4 года назад
No, Thank you for making such amazing videos
@manikandand2541
@manikandand2541 4 года назад
chiere.....
@rojanshrestha822
@rojanshrestha822 3 года назад
if brevity is the soul of wit, then python is in a class by itself !! Wow
@Terniedintorni
@Terniedintorni 5 лет назад
I am currently attending a university master in data science. These videos are 100 times Better than the slides I got from my professor. Clear and Easy to apply. Thank you
@anonymous-wd7pb
@anonymous-wd7pb 2 года назад
Hi are u also learning machine learning...??
@rweaver6
@rweaver6 6 лет назад
Wonderful stuff. Sharp, professional and lively. The humorous delivery takes the edge off. At the same time, the presentation is carefully scripted to teach clearly and efficiently. No hesitations, no mistakes, no confusion. Just fast and pleasant learning. The code animation is easy on the eyes and so is she!
@alejorabirog1679
@alejorabirog1679 5 лет назад
It's a master piece.
@Sra4825
@Sra4825 5 лет назад
a masterpiece of a comment. clear and precise points. a subtle hint of hitting on the instructor.
@TheMangz1611
@TheMangz1611 4 года назад
@@Sra4825 she is worth it!
@kizzavincent
@kizzavincent 2 года назад
You must be the best communicator of all time! Thanks.
@instant_mint
@instant_mint 6 лет назад
I can't stop thinking of GLaDOS while listening to this.
@juanmosca
@juanmosca 6 лет назад
list comprehension is also a good option instead of map function: areas_lst = [ area(r) for r in radii ] also for filter: filtered_lst = [ d for d in data if d > avg ]
@xekis
@xekis 5 лет назад
I was also going to comment that these functions are mostly deprecated because of list comprehension and generator expressions.
@normalmighty
@normalmighty 5 лет назад
I was about to point out the same thing. You can much more cleanly combine both with an expresion like filtered_areas_list = [area(r) for r in radii if r > minimum ] and for the efficiency of an iterator, just swap the [] with () to make it a generator comprehension filtered_areas_iter =(area(r) for r in radii if r > minimum ) list and generator comprehensions are also far more intuitive for anyone who encounters them in the wild without knowing about them beforehand
@obinator9065
@obinator9065 4 года назад
More readable!
@balavarikuti
@balavarikuti 4 года назад
And faster than map filter and reduce.
@Kachelator
@Kachelator 4 года назад
same here
@pranjal86able
@pranjal86able 6 лет назад
Loving the hate for Fahrenheit :) "How could this happen"
@jcxmej
@jcxmej 6 лет назад
pranjal86able We do not know. 😂
@Psycho4Ever666
@Psycho4Ever666 6 лет назад
Like my first Professor in electrical engineering, she always told us to keep to keep it clean and metric ^^
@aaronmaturanacandelas2370
@aaronmaturanacandelas2370 6 лет назад
I was looking for this comment.
@divusiulius7539
@divusiulius7539 6 лет назад
That's why your Elect Engineering teacher likes Peter the Meter Man!
@CuongNguyen-le5ic
@CuongNguyen-le5ic 6 лет назад
Sigh, I wish US would use metric system, make life so much easier.
@myroncarvalho4872
@myroncarvalho4872 5 лет назад
Moment I heard the last line. Paused. Liked. Subscribed. Turned on notification. Too good.
@ARJUN-op2dh
@ARJUN-op2dh 6 лет назад
I generally don't comment but I am really amazed by this awesome video is. One word Awesome.... !! loved the way the concept was taught and delivered...
@eppotamus5255
@eppotamus5255 6 лет назад
I have never seen tutorials this amazing. Its like I traveled back in time 30-40 years when people still made sense - could think and communicate. I enjoyed these so much. Thank you for all the hard work and long hours you guys put into this series. You are hands down the best! Can't wait to see the next one.
@TheGuroLOLITA
@TheGuroLOLITA 2 года назад
Yep
@hmak5423
@hmak5423 4 года назад
At this very moment, you are the most engaging python teacher on RU-vid. Goes down mainly to the tone and style/theme and covering so much in one small video.
@kennymccormic7578
@kennymccormic7578 5 лет назад
This is by far the most clear explanation of filter/map/reduce! Thank you very much!
@stevejohnson1685
@stevejohnson1685 6 лет назад
From a Haskell programmer: Great introduction! In addition, script provides a nice, subtle sense of humor. Ms. Castro has superb enunciation.
@cruepprich
@cruepprich 5 лет назад
Best map,filter,reduce explanation i've seen for any language! Thx!
@019KADESH
@019KADESH 4 года назад
You are in a class by yourself Socratica! The way you teach is simply superb!
@jeffm6651
@jeffm6651 5 лет назад
This is by far the best explanation of map, filter & reduce in Python ever.
@jeffbarrett3344
@jeffbarrett3344 4 года назад
Extremely well done series. The best way to learn in my opinion. Short, to the point, engaging, code examples and awesome jokes. Using a one-liner one-liner joke... beautiful!
@DUANEYAISER
@DUANEYAISER 6 лет назад
Thank you for another great lesson! I've been using mapping lately and I love the way you explain it.
@robinccc
@robinccc 4 года назад
Didnt ever know that tutorials could be made this engaging. Brilliant.
@guilhermehx7159
@guilhermehx7159 4 года назад
These Python tutorials of Socratica are simply the best!!! 👏🏻👏🏻👏🏻
@doviche
@doviche 4 года назад
Just started studying python a month ago, after almost 20 years of java programming language and I've just fallen in love with it. Great programming language. Very cool and attractive presentations Socratica.
@stanislavhrytsyshyn1732
@stanislavhrytsyshyn1732 5 лет назад
Watching ur videos brings a lot of pleasure and understanding of some moments, thx for ur work!
@hashroot391
@hashroot391 6 лет назад
First video I've ever watched on this channel. Kinda spooky but very engaging.
@pdubocho
@pdubocho 5 лет назад
"How could this happen? I do not know" Easily my favorite video.
@emahbright8607
@emahbright8607 4 года назад
this is the funniest python tutorial i've heard in a while....
@kdub1242
@kdub1242 4 года назад
This stuff is great. Before going for the heavy artillery, it's also useful to first consider list/dict comprehensions, but map,filter,reduce are great tools for the toolbox.
@quazichimp
@quazichimp 6 лет назад
wonderfully presented as always!
@austinp.b6625
@austinp.b6625 6 лет назад
hahaha this is good tutorial !!! Sounds like CIA briefing :P
@nobytes2
@nobytes2 6 лет назад
Austin p.b maybe it is lol
@architarchitarchitarchitarchit
@architarchitarchitarchitarchit 2 года назад
how do you know what a cia briefing sounds like Mr pb ?
@ahmedscrazymixacm1167
@ahmedscrazymixacm1167 3 года назад
You are great finally, someone teaches python with enthusiasm, instead of the sleepy attitude , BTW i really like the themes you use Great job
@GEScott71
@GEScott71 5 лет назад
Wow I'm loving Python and Socratica more and more with each video - thanks Socratica!
@whatyearisit9756
@whatyearisit9756 5 лет назад
Why is Socratica so underrated. Why, oh why!?
@eleanormcarthur2900
@eleanormcarthur2900 3 года назад
lol I just found this channel
@henryyao4860
@henryyao4860 4 года назад
This is the most entertaining python tutorial I have seen lol, but at the same time, I got what I need. Thank you!
@avinash1904931
@avinash1904931 5 лет назад
Awesome. I was learning at Coursera applied data science with python. And had doubts in maps and lambda. Came across your video. Very creative and also very nice explanation with real life example. Excellent. Please make more playlists. Thank you so much
@aykutdizdar
@aykutdizdar 5 лет назад
I very much love the correct plural usage form of radius :)
@MrAlhanz
@MrAlhanz Год назад
You deserve much more attention! Those video are clear, interesting and have a great knowledge transfer.
@MyLinuxToyBox
@MyLinuxToyBox 5 лет назад
I love the voice and speaking rhythm. Very informative videos.
@user-wc1sm8cj8s
@user-wc1sm8cj8s 3 года назад
This is the only tutorial I've seen so far with this quality of editing, like, WHOAH!!!!
@Jenko022
@Jenko022 6 лет назад
I have been practising Python three for a while now but what I would really like to see is some videos on project ideas or scenarios to build on using Python. This would be great from practice and learning.
@faisalee
@faisalee Год назад
I am addicted to your channel. Such wonderful delivery and the humour is priceless 😊
@kaushilkundalia2197
@kaushilkundalia2197 5 лет назад
The most unique python tutorial ever !! Loved it and the content is also very good ! Thanks :D !
@awisecar9540
@awisecar9540 14 дней назад
Love the Halo/Matrix-esque aesthetic of this channel 🖤
@jakeambrose4294
@jakeambrose4294 2 года назад
Your course is awesome! Thank you. Im going through sololearns python courses and for each section, whatever the subject is, i come to your vids for further thorough explanation of whats being taught. I Appreciate your efforts more than words can express.
@user-bm8uc1ei5p
@user-bm8uc1ei5p Год назад
What a beauty... Programming languages always surprise me with its deep. Thank you for clear explanation!
@Sjutturaah
@Sjutturaah 4 года назад
Ok. You just got a sub. These are hilarious while at the same time quite informational and compact. Well done.
@PunmasterSTP
@PunmasterSTP 3 года назад
Another phenomenal Python video from Socratica. This one was particularly...filter-ific!
@indrajitbagchi7313
@indrajitbagchi7313 6 лет назад
these are seriously underrated videos......one of the best python tutorials......very nice
@mrmuranga
@mrmuranga 6 лет назад
Well summarized and easy to follow along in a clever,humorous way...please make more videos..
@Tweston3ny
@Tweston3ny Год назад
Fantastic, per usual. Thank you. Awesome presentations with flawless, logical, and efficient, instruction and code.
@gustavomaganalopez6427
@gustavomaganalopez6427 6 лет назад
This is beautiful! Thanks Socrática!
@GamingBlake2002
@GamingBlake2002 4 года назад
Great tutorial, concise and simple
@bicycleninja1685
@bicycleninja1685 5 лет назад
Awesome. The reduce example also works with text. ",".join(mylist) is commonly used, but reduce gives you more flexibility and in my opinion is more elegant, especially if you're combining multiple operations/functions.
@ishanktyagi3220
@ishanktyagi3220 3 года назад
Thats amazing fully qualitative stuff with both professional and some humor thanks for the content
@poyrazaktas6374
@poyrazaktas6374 3 года назад
I've just explored this channel and I loved it!
@DevinderKumar
@DevinderKumar 3 года назад
Very crisp, clear and efficient !
@janaynalima100
@janaynalima100 5 лет назад
An amazing introduction! Thank you!
@AjaySharma-pg9cp
@AjaySharma-pg9cp 2 года назад
Till now I haven't seen a video being posted like this, great with differences that making this playlist and channel different from others, keep it up
@Socratica
@Socratica 2 года назад
Thank you for your kind and encouraging message!! 💜🦉
@nkoroieric
@nkoroieric 6 лет назад
your illustrations always hit the nail on the head.
@pruthvip8137
@pruthvip8137 3 года назад
A unique style of python concept explanation , very different from other python learning RU-vid videos . Nice :)
@humanrightsadvocate
@humanrightsadvocate Год назад
It took me 12 years to find this channel. The algorithm never recommended me this channel. I stumbled upon this channel by entering, filter map lazy, in the search bar. Because... I was doing some exercises with map() and filter() and noticed the following code had unexpected results: num_list_4 = [2, 3, 6, 8, 9, 12, 15, 17] threevens = filter(lambda x : not x%3, num_list_4) sqrs = map(lambda x : x*x, threevens) print(num_list_4) #print(list(threevens)) print(list(sqrs)) The commented out line causes the sqrs list to be empty. And that's why I'm here.
@slimyelow
@slimyelow 5 лет назад
another excellent concise python tutorial - loved it
@quantum-t
@quantum-t 4 года назад
Your style of the lessons is awesome :)
@PKR1503
@PKR1503 4 года назад
Your explanations are the best! Thanks for the help.
@aghoorchian
@aghoorchian 3 года назад
Captivating while teaching me what I needed to learn. Finally I know I'm gonna master Python soon!
@Leonardo-jv1ls
@Leonardo-jv1ls 4 года назад
I loved the explanation. Thank you. But if is was there in person watching, i would NEVER, raise my hand if had some doubt. This woman talking give me chills.
@PerpetuaICreativity
@PerpetuaICreativity 3 года назад
This is a python masterclass...even the jokes are efficient. great job and more please!
@jakobfredriksson2272
@jakobfredriksson2272 3 года назад
Wow... Yesterday I found this channel and I can honestly write I've had difficulties with map, filter and reduce; especially knowing when to use them. EVERYTHING fell in place with this short video... amazing.
@Socratica
@Socratica 3 года назад
This was so great to hear - thank you for telling us! It really helps us get motivated to make more videos! 💜🦉
@jakobfredriksson2272
@jakobfredriksson2272 3 года назад
@@Socratica You are so welcome! I've watched some more videos this evening and you're making all subjects crystal clear in a very unique way. Keep up the good work! :)
@lost-prototype
@lost-prototype Год назад
I love the Command and Conquer / Westwood Studios vibe of these videos. I love post apocalyptic learning.
@nikhilkash92
@nikhilkash92 3 года назад
Your presentation is just out of this world.
@pavankumarreddytadi7104
@pavankumarreddytadi7104 4 года назад
Those graphics I would say are amazing. Subscribed in the first one minute.
@alan6506305
@alan6506305 5 лет назад
impressed by your professional projects
@sheilaquan9824
@sheilaquan9824 5 лет назад
Oh this explanation is so cool!!Loving it !!!
@FatMise
@FatMise 4 года назад
This was a real trip. Kudos.
@patrykties
@patrykties 5 лет назад
w00t ....great way to teach ^^ I felt like in the game, environment my brain loves. Thanks again for a great tut
@xonxt
@xonxt 4 года назад
I love this style :D Like I'm listening to a briefing in Command&Conquer, or something.
@jasonavina8135
@jasonavina8135 Год назад
These videos are evidence that anything can be explained in a clear, concise and easy to understand way. It really shows how silly knowledge gatekeeping is at the university and institutional level.
@MK-lh3xd
@MK-lh3xd Год назад
Socratica team is a unique blend of technology, teaching, wit and dialog delivery.
@Socratica
@Socratica Год назад
These are a few of our favourite things!! 💜🦉
@natalieastafeva4885
@natalieastafeva4885 3 года назад
You made python sound like a detective story,very entertaining and useful!
@daslolo
@daslolo 5 лет назад
"Python should be a comedian because it's full of one liners" - subscribed
@austinp.b6625
@austinp.b6625 6 лет назад
So reduce take two inputs at a time .. like the fibinocci and map just one input. Good one. Thanks a lot
@hirephpdevelopers3840
@hirephpdevelopers3840 6 лет назад
Very useful tutorial, i have learned a lot from this video, thank you.
@jonathanmeyer4842
@jonathanmeyer4842 5 лет назад
The "multiplier" lambda expression is already defined in Python -> "import operator as op" Therefore the reduce call is : "reduce(op.mul, data)"
@MrEstebanEscudero
@MrEstebanEscudero 2 месяца назад
Great video! Thanks
@dheerajverma8722
@dheerajverma8722 5 лет назад
i loved the way of you're explanation..❤❤ feels like a scifi video
@mohamed-abdelhay-desertcamel
@mohamed-abdelhay-desertcamel 6 лет назад
Amazing enough ...i liked the way u describe everything .. Thanks a lot lady .. And thanks for everyone who helped in that 💓❤💓
@greyhnd001
@greyhnd001 4 года назад
Awesome scripts. I am seeing this usefull for converting ips to binary and build a subnet calculator to confirm our firewall configurations are correct. Thank you so much for the work you've done on this.
@audiebez3009
@audiebez3009 6 лет назад
As always !!! Brilliant thank you for the great educational videos .
@RobertoMartinez-pz7im
@RobertoMartinez-pz7im 2 года назад
Thanks so much for this video!
@rohitchakravarthi94
@rohitchakravarthi94 Год назад
If brevity is the soul of wit then python is a class by itself. "Wow", this channel needs to be praised for its intellectual content.
@AJ-et3vf
@AJ-et3vf 2 года назад
Awesome video! Thank you!
@raphasage
@raphasage 2 года назад
A keen sence of dread lurking around you... ...must complete the class, for your own survival! Love the approach! Inta Sub!
@md.mojiburrahaman1223
@md.mojiburrahaman1223 9 месяцев назад
Very precise discussion.
@jimparsons6803
@jimparsons6803 Год назад
Liked the clip. 'Friend Face.' Instructive as always with useful and practical information and approaches.
@sandeepnalvaya7612
@sandeepnalvaya7612 3 года назад
After watching this, I want to buy a projector first, and tune in on this channel from video 1. Great work👍
@CI-ym5hr
@CI-ym5hr 2 года назад
Incredible presentation!
@ibrames3
@ibrames3 2 года назад
This video is amazing. I liked so much!!!
@FelipeMaffezzolli
@FelipeMaffezzolli 5 лет назад
Great content! Thank you!
@karannagpal6390
@karannagpal6390 5 лет назад
Just so people know, this is in python 3. In python 2.7, map returns a list itself and not a generator so there is no need to do list(map(fn, list_of_ele)) rather map(fn, list_of_ele) returns the final list.
@Nozomu564
@Nozomu564 5 лет назад
[fn(el) for el in list_of_ele] There's no reason to ever use map in 2.7
@rednafi
@rednafi 5 лет назад
And people who still use python 2.7 should go back to Jurassic age.
@keijo456
@keijo456 6 лет назад
Thank you! keep them coming
Далее
МОЩЩЩНОСТЬ ZEEKR 001 FR
00:46
Просмотров 1,4 млн
Заметили?
00:11
Просмотров 2,9 млн
Python: Lambda, Map, Filter, Reduce Functions
9:59
Просмотров 376 тыс.
AsyncIO, await, and async - Concurrency in Python
9:12
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1 млн