From the course: Introducing Jupyter
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Line graphs
- [Instructor] Playing cards are one of the most basic styles of data visualization. I want to cover some specific properties and ways to create line charts. We'll still be using the plot function. For this example, I'll be plotting the averages of some of the columns of the dataset over the course of a year. I'm going to use the load magic to load up a couple of helper functions that I have defined to do some of the heavy lifting. Those files are available in the exercise files, chapter three, folder called helper_funcs. The first one reads in the CSV file for a given year. The second one calculates an average of a given column in the DataFrame for a given month. Now I'm going to define a function that I'll be using for this notebook called yearly_average. I will explicitly define a DataFrame to be used so that I can read it in just once for this exercise. With those functions defined, now I have everything I need to plot some line graphs. I'll start off by plotting the average wind…
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.