Similarities between Series and DataFrame
Explore the similarities between pandas Series and DataFrames by working with a dataset of US presidents' rankings. Understand data loading, cleaning, and chained operations to prepare data, while seeing that many Series functions apply to DataFrames, enabling efficient data analysis.
We'll cover the following...
We’ll be exploring a dataset from a Siena College Poll in 2018. This data has rankings of United States presidents in various attributes. We’ll pull the raw data and show how to recreate the visualization first. Then we’ll demonstrate more features of DataFrames with the presidential data.
Getting the data
Wikipedia has the data from Siena College. We can scrape the data using the following commands.
Note: Given that Wikipedia can change at any time, there is no guarantee that this code will work at the time of your taking this course.
Once the data was loaded, we removed some rows (the first and ...