How it works...

All values in a Series can be compared against a scalar value using the standard comparison operators( <, >, ==, !=, <=, >=). The expression movie.imdb_score > 8 yields a Series of booleans where all imdb_score values prices exceeding 8 are True and those less than or equal to 8 are False. The index of this boolean Series retains the same index as the original and in this case, is the title of the movie.

The criteria3 variable is created by two independent boolean expressions. Each expression must be enclosed in parentheses to function properly. The pipe character, |, is used to create a logical or condition between each of the values in both Series.

All three criteria need to be True to match the requirements of the recipe. They are each combined together with the ampersand character, &, which creates a logical and condition between each Series value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.254.118