Map, Filter, and Reduce Functions || Python Tutorial || Learn Python Programming
Vložit
- čas přidán 17. 09. 2017
- 𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: 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)
♦♦♦♦♦♦♦♦♦♦
Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica
Python should be a comedian because it is full of one liners.
lol
A Map, a Filter, and a Reduce walk into a compiler... >.< Ugh! Obviously I should NOT be a comedian, lol.
1:40 "If brevity is the soul of wit, then python is in a class by itself"
The language itself was named after monty python
Still too long. What in python you write in 1 line, in R you do in couple of symbols
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!! 💜🦉
Smile pls
@Stimpy&Ren ok
No, Thank you for making such amazing videos
chiere.....
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!
It's a master piece.
a masterpiece of a comment. clear and precise points. a subtle hint of hitting on the instructor.
@@Sra4825 she is worth it!
You must be the best communicator of all time! Thanks.
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
Hi are u also learning machine learning...??
if brevity is the soul of wit, then python is in a class by itself !! Wow
Moment I heard the last line. Paused. Liked. Subscribed. Turned on notification. Too good.
At this very moment, you are the most engaging python teacher on CZcams. Goes down mainly to the tone and style/theme and covering so much in one small video.
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...
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 ]
I was also going to comment that these functions are mostly deprecated because of list comprehension and generator expressions.
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
More readable!
And faster than map filter and reduce.
same here
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.
Yep
I can't stop thinking of GLaDOS while listening to this.
From a Haskell programmer: Great introduction! In addition, script provides a nice, subtle sense of humor. Ms. Castro has superb enunciation.
Welcome to Socratica! You can see our entire Python Playlist here: bit.ly/PythonSocratica
Subscribe to see all our new videos! bit.ly/SocraticaSubscribe
Pls make more videos on python projects
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.
Loving the hate for Fahrenheit :) "How could this happen"
pranjal86able We do not know. 😂
Like my first Professor in electrical engineering, she always told us to keep to keep it clean and metric ^^
I was looking for this comment.
That's why your Elect Engineering teacher likes Peter the Meter Man!
Sigh, I wish US would use metric system, make life so much easier.
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!
This is by far the most clear explanation of filter/map/reduce! Thank you very much!
You are in a class by yourself Socratica! The way you teach is simply superb!
This is by far the best explanation of map, filter & reduce in Python ever.
Support what you love! Socratica has a Kickstarter to make more Python: bit.ly/PythonKickstarter
Best map,filter,reduce explanation i've seen for any language! Thx!
Didnt ever know that tutorials could be made this engaging. Brilliant.
What a beauty... Programming languages always surprise me with its deep. Thank you for clear explanation!
This is the most entertaining python tutorial I have seen lol, but at the same time, I got what I need. Thank you!
This is the only tutorial I've seen so far with this quality of editing, like, WHOAH!!!!
These Python tutorials of Socratica are simply the best!!! 👏🏻👏🏻👏🏻
I am addicted to your channel. Such wonderful delivery and the humour is priceless 😊
Wow I'm loving Python and Socratica more and more with each video - thanks Socratica!
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
Thank you for another great lesson! I've been using mapping lately and I love the way you explain it.
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
Thank you for your kind and encouraging message!! 💜🦉
"How could this happen? I do not know"
Easily my favorite video.
First video I've ever watched on this channel. Kinda spooky but very engaging.
We're halfway there. We still need your help! Support Socratica Python Kickstarter: bit.ly/PythonKickstarter
Ok. You just got a sub. These are hilarious while at the same time quite informational and compact. Well done.
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.
You deserve much more attention! Those video are clear, interesting and have a great knowledge transfer.
A keen sence of dread lurking around you... ...must complete the class, for your own survival!
Love the approach! Inta Sub!
I've just explored this channel and I loved it!
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.
This was so great to hear - thank you for telling us! It really helps us get motivated to make more videos! 💜🦉
@@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! :)
This is a python masterclass...even the jokes are efficient. great job and more please!
Watching ur videos brings a lot of pleasure and understanding of some moments, thx for ur work!
Thats amazing fully qualitative stuff with both professional and some humor thanks for the content
these are seriously underrated videos......one of the best python tutorials......very nice
You are great finally, someone teaches python with enthusiasm, instead of the sleepy attitude , BTW i really like the themes you use Great job
this is the funniest python tutorial i've heard in a while....
Liked the clip. 'Friend Face.' Instructive as always with useful and practical information and approaches.
Ok, that joke at the end had me laughing in public. Nice breakdown of those function, BTW.
Why is Socratica so underrated. Why, oh why!?
lol I just found this channel
hahaha this is good tutorial !!! Sounds like CIA briefing :P
Austin p.b maybe it is lol
how do you know what a cia briefing sounds like Mr pb ?
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.
The most unique python tutorial ever !! Loved it and the content is also very good ! Thanks :D !
A unique style of python concept explanation , very different from other python learning CZcams videos . Nice :)
I love the Command and Conquer / Westwood Studios vibe of these videos. I love post apocalyptic learning.
Fantastic, per usual. Thank you. Awesome presentations with flawless, logical, and efficient, instruction and code.
"Python should be a comedian because it's full of one liners" - subscribed
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.
Another phenomenal Python video from Socratica. This one was particularly...filter-ific!
I kinda like your approach very much, must've been so much effort put in this.
Your presentation is just out of this world.
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.
You made python sound like a detective story,very entertaining and useful!
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.
I very much love the correct plural usage form of radius :)
Thank you for the video. I am grateful for your time and contribution. Kind regards, Akira.
Wow! I can't believe you are dis'ing the reduce function. The reduce function is the general form for more specific functional ideas.. A solid understanding of reduce is essential for any modern programmer.
> Beautiful is better than ugly [...]
python -c 'import this'
Socratica team is a unique blend of technology, teaching, wit and dialog delivery.
These are a few of our favourite things!! 💜🦉
Captivating while teaching me what I needed to learn. Finally I know I'm gonna master Python soon!
Excelent video! I like the style and the presentation character too. And a tasty last line python joke. Congratulations. It would had been gorgeous to have a teacher like her in my college years. Hahahaha!!!
I love the voice and speaking rhythm. Very informative videos.
Well summarized and easy to follow along in a clever,humorous way...please make more videos..
Nice innovative idea than other tutorials to explain.... Loved it
3:09 - "Do not forgot your jacket if you are visiting Argentina" ahaha that was gold!
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.
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.
your illustrations always hit the nail on the head.
wonderfully presented as always!
After watching this, I want to buy a projector first, and tune in on this channel from video 1. Great work👍
Those graphics I would say are amazing. Subscribed in the first one minute.
This is beautiful! Thanks Socrática!
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.
Love the Halo/Matrix-esque aesthetic of this channel 🖤
Very crisp, clear and efficient !
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.
Wow... finally understood... thanks and subscribed
"Python should be a comedian because it is full of one-liners." haha You got me there.!!
This video is amazing. I liked so much!!!
Your explanations are the best! Thanks for the help.
I love this style :D
Like I'm listening to a briefing in Command&Conquer, or something.
w00t ....great way to teach ^^ I felt like in the game, environment my brain loves. Thanks again for a great tut
So reduce take two inputs at a time .. like the fibinocci and map just one input. Good one. Thanks a lot
Interesting approach style-wise. I like it.
another excellent concise python tutorial - loved it
Python ain’t the only comedian on this channel! 😉 I do love map and filter, but after they took reduce away I found myself leaning more towards just using list comprehensions. I usually want a list anyway. I do agree with the philosophy of providing a single way to do something, and map and filter are extra viewed that way.
Good staff:) and it sounds like 'We are the Borg, you will be assimilated' - I like this;)
Very charming and delightful narrative
Amazing enough ...i liked the way u describe everything ..
Thanks a lot lady ..
And thanks for everyone who helped in that 💓❤💓
Hello Socratica, I have always enjoyed your Python Videos.
Will you continue making all this great stuff ? 👌
Greetings from Belgium.
An amazing introduction! Thank you!