From the course: Interactive Dashboards with Plotly and Dash

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Demo: Plotly graph objects

Demo: Plotly graph objects

- [Instructor] All right, so let's go ahead and take a look at the Plotly Express and Plotly Graph Objects plotting frameworks in the Plotly Library. We're going to import pandas and numpy for our data manipulation magic. And then to import graph objects, we just do Plotly dot graph underscore objects as go. That's the standard alias. And then Plotly dot Express, the Express module is Plotly Express, and we'll import that as px. And again, that's a standard alias. And so we're going to create a dataframe called education. We're going to read in that same education data we worked with in section one, but we're going to create two columns. I'm going to create a column called expenditure for student, which is just total expenditure in that row divided by the enrollment in that row. So grades all G is the total number of students. Total expenditure is the total amount spent. So if we divide total amount spent by the number of students, we get the amount spent per student. And remember…

Contents