Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβperfect for learners of all ages.
Enroll to start learning
Youβve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take mock test.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
How do you add a new column named 'Height' with values [5.5, 6.0, 5.8]?
π‘ Hint: Remember to use the DataFrame variable and assign the values.
Question 2
Easy
What command would you use to delete a column named 'Weight'?
π‘ Hint: Use the drop method, which takes column names as parameters.
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
What method is used to add a new column in a Pandas DataFrame?
π‘ Hint: Think about how you normally assign values in Python.
Question 2
True or False: The drop()
method can remove multiple columns at once.
π‘ Hint: Recall how we've handled multiple columns in discussions.
Solve 2 more questions and get performance evaluation
Push your limits with challenges.
Question 1
Create a DataFrame with three columns: 'Product', 'Price', and 'Sales'. Add a new column 'Profit' calculated as Price - Sales.
π‘ Hint: Make sure to perform the subtraction correctly to get the profit.
Question 2
Given a DataFrame with multiple columns, write code that removes any column whose name starts with 'temp_'.
π‘ Hint: Use list comprehension to generate the list of columns to drop.
Challenge and get performance evaluation