Thursday, 22 February 2024

10-question multiple-choice quiz on Pandas


 1. What is Pandas?

a. A data visualization library

b. A web development framework

c. A data manipulation library

d. A machine learning framework


2.  What is the primary data structure in Pandas for one-dimensional labeled data?

a. Series

b. DataFrame

c. Array

d. List


3. How do you read a CSV file into a Pandas DataFrame?

a. pd.load_csv()

b. pd.read_csv()

c. pd.read_data()

d. pd.import_csv()


4. How do you select a specific column in a Pandas DataFrame?

a. df.column('ColumnName')

b. df.select('ColumnName')

c. df['ColumnName']

d. df.get('ColumnName')


5. What is the purpose of the head() method in Pandas?

a. It gives the first few rows of the DataFrame

b. It returns the last rows of the DataFrame

c. It displays a summary statistics of the DataFrame

d. It provides information about the columns in the DataFrame


6. How do you handle missing values in a Pandas DataFrame?

a. Use the fillna() method

b. Use the remove_na() method

c. Use the drop_na() method

d. Pandas automatically handles missing values


7. What function is used to group data in Pandas based on one or more columns?

a. groupby()

b. aggregate()

c. sort()

d. combine()


8. How do you merge two DataFrames in Pandas based on a common column?

a. df.merge()

b. df.join()

c. df.concat()

d. df.combine()


9. What does the describe() method in Pandas provide?

a. Descriptive statistics of the DataFrame

b. A list of unique values in each column

c. Information about data types in the DataFrame

d. A summary of missing values in the DataFrame


10. What is the purpose of the to_csv() method in Pandas?

a. It saves the DataFrame to a CSV file

b. It converts the DataFrame to a Series

c. It exports the DataFrame to an Excel file

d. It prints the DataFrame to the console


Answer:

1. c, 

2. a, 

3. b, 

4. c, 

5. a, 

6. a, 

7. a, 

8. a, 

9. a, 

10. a

0 Comments:

Post a Comment

Popular Posts

Categories

AI (33) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (146) C (77) C# (12) C++ (82) Course (67) Coursera (198) Cybersecurity (24) data management (11) Data Science (106) Data Strucures (8) Deep Learning (13) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (21) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Nvidia (1) Pandas (3) PHP (20) Projects (29) Python (893) Python Coding Challenge (285) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (42) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses