Pandas MCQ Test: Pandas MCQs - Practice Questions
1. What does the `filter()` function in Pandas allow you to do?
2. How can you filter rows in a Pandas DataFrame 'df' where the column 'column_name' is equal to 10?
3. What does the `groupby()` function in Pandas allow you to do?
4. How do you rename a column in a Pandas DataFrame?
5. In Pandas, what method is used to drop missing values from a DataFrame?
6. What does the Pandas function 'df.isnull()' return?
7. Which Pandas method is used to pivot a DataFrame based on column values?
8. How can you convert a Pandas DataFrame to a NumPy array?
9. What does the Pandas function 'df.groupby()' allow you to do?
10. How can you add a new column 'new_column' with values 1, 2, 3, ... N to a Pandas DataFrame 'df'?
11. How do you efficiently apply a function to elements in a specific column of a Pandas DataFrame?
12. In Pandas, how can you sort a DataFrame based on multiple columns?
13. How can you calculate the median of a specific column 'column_name' in a Pandas DataFrame 'df'?
14. How do you check the data types of columns in a Pandas DataFrame?
15. Which Pandas function is used to perform element-wise mathematical operations on two DataFrames?
16. In Pandas, how can you efficiently handle heavy-tailed distributions by applying a power transformation?
17. In Pandas, how can you efficiently encode categorical variables using one-hot encoding with a specified prefix for column names?
18. In Pandas, what does the `str.replace()` method do?
19. What is the purpose of the `between_time()` method in Pandas?
20. How can you efficiently reshape a Pandas DataFrame by converting column values into separate columns with binary indicators?