Pandas MCQ Test: Pandas MCQs - Practice Questions
1. What does the Pandas function 'df.fillna()' do?
2. How can you rename a column 'old_name' to 'new_name' in a Pandas DataFrame 'df'?
3. How can you efficiently handle missing values in a Pandas DataFrame considering both forward and backward filling?
4. In Pandas, how can you efficiently encode categorical variables using one-hot encoding with a specified prefix for column names?
5. In Pandas, how can you efficiently handle outliers by transforming them based on a power transformation?
6. Which Pandas method is used to calculate the correlation between columns in a DataFrame?
7. In Pandas, what does the `isin()` method do?
8. What does the `filter()` function in Pandas allow you to do?
9. What does the Pandas function 'df.drop()' do?
10. What does the Pandas function 'df.groupby()' allow you to do?
11. What does the Pandas function 'df.describe()' provide?
12. How can you efficiently handle imbalanced data in a classification problem using Pandas?
13. In Pandas, how do you efficiently calculate a rolling window average for a specific column?
14. How can you convert a Pandas DataFrame to a NumPy array?
15. What is the purpose of the `cummin()` function in Pandas?
16. How can you efficiently reshape a Pandas DataFrame by converting column values into separate columns with binary indicators?
17. Which Pandas function is used to merge two DataFrames based on a common column?
18. How can you perform element-wise addition of two Pandas Series 's1' and 's2'?
19. What is the purpose of the Pandas function 'df.drop_duplicates()'?
20. How do you rename a column in a Pandas DataFrame?
21. What is the purpose of the `str.contains()` method in Pandas?
22. What does the Pandas function 'df.info()' provide?
23. How can you sort a Pandas DataFrame 'df' by the values in the column 'column_name' in ascending order?
24. How can you calculate the median of a specific column 'column_name' in a Pandas DataFrame 'df'?
25. In Pandas, how do you create a new column based on the maximum value from multiple columns?
26. In Pandas, what does the `interpolate()` function do?
27. In Pandas, how can you sort a DataFrame based on multiple columns?
28. What is the purpose of the `ffill()` and `bfill()` functions in Pandas?
29. What is the purpose of the Pandas function 'df.iloc[]'?
30. What is the purpose of the `between_time()` method in Pandas?