- Python has become pretty popular among data scientists…and other developers who need to work with large amounts…of data and that's not an accident.…The Python standard library provides built-in functions…for transforming sequences of data.…And you should use these whenever you find you have…a need for that kind of operation.…So in this example, we'll take a look…at some of those functions.…So here in VS code, I have opened the file…transforms_start.py in my built-in functions chapter.…
And I'll try out the filter function first.…The filter functions does essentially what its name implies.…It creates an iterator that filters out values…from a given sequence.…You pass it a function to perform a Boolean test…and if that test returns false,…then that item is removed from the resulting sequence.…So I have a list of numbers here in my editor…right here at nums.…And let's suppose I'd like to filter out the even numbers.…
So first, I'll write the code to call the filter function…and I'll name the results odds,…and I'm going to make a list out of the result…
- Truth value testing
- Template strings
- Advanced Python functions
- Advanced collections
- Advanced classes and objects
- Python comprehensions: list, dictionary, and set
Skill Level Advanced
1. Python Language Features
2. Built-In Functions
3. Advanced Python Functions
4. Advanced Collections
5. Advanced Classes and Objects
6. Using Logging
7. Python Comprehensions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.