Search this site
Embedded Files
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
AIMD GPDS Courses
  • Home
  • Courses
  • Contact
  • More
    • Home
    • Courses
    • Contact

日本語  ❯

Lesson 4    ❮    Lesson List    ❮    Top Page

4.1  Intro to matplotlib

4.2  Plotting with pandas

4.3  Styles of Visualization

❯  4.4  Advanced Filtering

4.5  Multiple Plots with Seaborn

⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
EXPECTED COMPLETION TIME
❲▹❳  Video   9m 51s
☷  Interactive readings   5m

Filtering using Series methods that return Boolean value

Before we see further on plotting, we will expand our knowledge on filtering by using some useful methods that return boolean value:

series.between(left, right) Return boolean Series equivalent to left <= series <= right
series.gt(other) Return boolean Series equivalent to series > other
series.lt(other) Return boolean Series equivalent to series < other
series.eq(other) Equivalent to series == other.
series.isin(values) Return a boolean Series showing whether each element in the Series matches an element in the passed sequence of values exactly.

Performing Pivoting on a DataFrame

Pivoting is the process of converting a categorical column into headers label.

Pivoting requires three argument:

index: Column to use to make new frame’s index. If None, uses existing index.
columns:  Column to use to make new frame’s columns.
values: Column(s) to use for populating new frame’s values. If not specified, all remaining columns will be used. 

Comparing Multiple Plots

Using the pivot DataFrame, it becomes easier to construct multiple kinds of plots.

In this example, we will see 4 kinds of plots for categoric--bar plot, line plot,  a stacked bar chart, and a stacked ratio chart. We also see how to make a histogram from one of the Series.

©2023. All rights reserved.  Samy Baladram,
Graduate Program in Data Science - GSIS - Tohoku University
Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse