Book Image

Data Analysis and Exploration with Pandas [Video]

By : Theodore Petrou
Book Image

Data Analysis and Exploration with Pandas [Video]

By: Theodore Petrou

Overview of this book

<p>Are you looking for a gigantic boost in your productivity? Are you searching for some interesting and fun tricks to solve your data problems? If so, then this course is indeed a perfect choice for you. This course provides you with unique, idiomatic, and amazing solutions for both fundamental and advanced data manipulation tasks with pandas.</p> <p>Some solutions focus on achieving a deeper understanding of basic principles, or comparing and contrasting two similar operations. A few others will delve into a particular dataset, and let you uncover new and unexpected insights along the way.</p> <p>The pandas library is massive, and it's common for frequent users to be unaware of many of its more impressive features. The official pandas documentation, while thorough, does not contain many useful examples of how to piece together multiple commands as one would do during an actual analysis. This course guides you, as if you were looking over the shoulder of an expert, through practical situations that you are highly likely to encounter. Many advanced solutions combine several different features across the pandas library to generate results.</p> <p>The code bundle for the video course is available at - <a style="color: #fa8d11;" href="https://github.com/PacktPublishing/Data-Analysis-and-Exploration-with-Pandas" target="blank">https://github.com/PacktPublishing/Data-Analysis-and-Exploration-with-Pandas</a></p> <h2><span class="sugar_field">Style and Approach</span></h2> <p>This course includes interesting and illustrative examples and delivers very detailed explanations for each line of code in all of the examples. All code and dataset explanations exist in Jupyter Notebooks, an excellent interface for exploring data. In other words, this is an easy guide with a problem/solution approach for real-world datasets.</p>
Table of Contents (9 chapters)
Chapter 5
Boolean Indexing
Content Locked
Section 10
Preserving Series with the WHERE Method
Boolean indexing necessarily filters your dataset by removing all the rows that don't match the criteria. Instead of dropping all these values, it is possible to keep them using the where method. The where method preserves the size of your Series or DataFrame and either sets the values. In this recipe, we pass the where method Boolean conditions to put a floor and ceiling on the minimum and maximum number of Facebook likes for actor 1 in the movie dataset. - Use the describe method to get a sense of the distribution - Plot a histogram of this Series to visually inspect the distribution - Create criteria to put a floor on the minimum number of likes and replace the values not meeting with the condition to 300