Transforming Data With Pandas
In this lesson, we'll continue working with the World Happiness Report and explore another aspect of it that we haven't analyzed yet - the factors that contribute to happiness. As a reminder, the World Happiness Report assigns each country a happiness score based on a poll question that asks respondents to rank their life on a scale of 0 to 10.
Throughout this lesson, we'll explore how to transform data using pandas. To facilitate your exploration of transforming data with pandas, you'll work to answer the following question in this mission:
- Which of the factors that contribute to happiness contribute the most to the happiness score?
In order to answer this question, we need to manipulate our data into a format that makes it easier to analyze. We'll explore the following functions and methods to perform this task:
As you work through each concept in this lesson, you’ll get to apply what you’ve learned from within your browser so that there's no need to use your own machine to do the exercises. The Python environment inside of this course includes answer checking so you can ensure that you've fully mastered each concept before learning the next concept.
2. Apply a Function Element-wise Using the Map and Apply Methods
3. Apply a Function Element-wise Using the Map and Apply Methods Continued
4. Apply a Function Element-wise to Multiple Columns Using Applymap Method
5. Apply Functions along an Axis using the Apply Method
6. Apply Functions along an Axis using the Apply Method Continued
7. Reshaping Data with the Melt Function
8. Challenge: Aggregate the Data and Create a Visualization
9. Next steps