Question 1:
What is Pandas?
a) A species of bear
b) A data manipulation and analysis library in Python
c) A programming language
d) A web development framework
Question 2:
Which of the following data structures is used to store one-dimensional labeled data in Pandas?
a) Series
b) DataFrame
c) Array
d) List
Question 3:
How can you import the Pandas library in Python?
a) import panda
b) import pandas as pd
c) from pandas import *
d) import pd
Question 4:
What is the primary purpose of a Pandas DataFrame?
a) Storing only numerical data
b) Storing two-dimensional labeled data
c) Storing images and multimedia files
d) Storing text data
Question 5:
Which Pandas function is used to read a CSV file into a DataFrame?
a) read_csv()
b) load_csv()
c) import_csv()
d) read_file()
Question 6:
How can you access a specific column in a Pandas DataFrame?
a) By using the column's index
b) By using the column's label or name
c) By using the row number
d) By using the DataFrame's index
Question 7:
What does the head() function do in Pandas?
a) Prints the first few rows of a DataFrame
b) Prints the last few rows of a DataFrame
c) Prints a summary statistics of the DataFrame
d) Prints the shape of the DataFrame
Question 8:
Which Pandas method is used to check for missing values in a DataFrame?
a) find_missing()
b) check_missing()
c) missing_values()
d) isnull()
Question 9:
What is the purpose of the iloc method in Pandas?
a) Selects columns based on their labels
b) Selects rows and columns based on their integer positions
c) Performs element-wise operations on a DataFrame
d) Checks for duplicate values in a DataFrame
Question 10:
How can you drop a column named "Column_A" from a Pandas DataFrame called df?
a) df.remove("Column_A")
b) df.drop("Column_A", axis=1)
c) df.delete("Column_A")
d) df.remove_column("Column_A")
Question 11:
Which Pandas function is used to filter rows based on a condition?
a) filter_rows()
b) select_rows()
c) filter()
d) query()
Question 12:
In Pandas, what is the purpose of the groupby() function?
a) Groups data based on unique values in a column
b) Reverses the order of rows in a DataFrame
c) Computes the mean of each column
d) Reshapes a DataFrame into a pivot table
Question 13:
How can you rename a specific column in a Pandas DataFrame?
a) rename_column()
b) change_column_name()
c) df.rename()
d) df.change_name()
Question 14:
What does the merge() function in Pandas do?
a) Merges two DataFrames based on a specified column or index
b) Adds a new column to a DataFrame
c) Sorts the rows of a DataFrame
d) Reshapes a DataFrame into a long format
Question 15:
Which Pandas function is used to pivot a DataFrame?
a) pivot()
b) reshape()
c) pivot_table()
d) transpose()
Question 16:
What is the purpose of the to_csv() function in Pandas?
a) Converts a DataFrame to a CSV file
b) Converts a CSV file to a DataFrame
c) Checks if a CSV file is valid
d) Counts the number of occurrences of each value in a DataFrame
Question 17:
Which method is used to fill missing values in a Pandas DataFrame with a specific value?
a) fillna()
b) fill_missing()
c) replace()
d) impute()
Question 18:
How can you sort a Pandas DataFrame based on a specific column?
a) df.sort_by("column_name")
b) df.sort("column_name")
c) df.sort_values("column_name")
d) df.order_by("column_name")
Question 19:
What is the purpose of the pivot_table() function in Pandas?
a) Pivots a DataFrame from long to wide format
b) Computes the sum of each column in a DataFrame
c) Transposes a DataFrame
d) Aggregates data based on one or more columns
Question 20:
Which Pandas function is used to calculate summary statistics of a DataFrame?
a) describe()
b) summary()
c) stats()
d) analyze()
0 Comments:
Post a Comment