From the course: More Python Tips, Tricks, and Techniques for Data Science
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Querying and filtering data - Python Tutorial
From the course: More Python Tips, Tricks, and Techniques for Data Science
Querying and filtering data
- [Instructor] The power of Python data science tech is built upon the ability of NumPy and pandas to push basic operations into C via an intuitive syntax. Now, pandas include tools that allow you to directly access C speed operations without costly allocation of intermediate arrays. Now, these are the eval and the query functions. And in this video we will walk you through the use case and give some rules of thumb about when you might want to use them. Now, first off I have imported the libraries NumPy and pandas. So once you have done that, here I am using this file called advertising.csv, which contains revenues for TV, radio and different other media. So let's see what we have in the dataset. So you see, we have four columns, TV, radio, newspaper and the total sales. Now these are scaled down. Basically the numbers are much bigger than these. So these are the revenues for each day for a particular month. Now, if…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.