Pandas Quiz (Data Analysis)

Hello Everyone,
Try to answer all

  1. Which data structures are primarily used in Pandas?
    a) Arrays
    b) DataFrames and Series
    c) Tuples and Sets

  2. How do you import Pandas in a Python script or Jupyter Notebook?
    a) import panda
    b) import pd
    c) import pandas as pd

  3. What is the primary data structure in Pandas for storing tabular data?
    a) DataFrame
    b) Array
    c) List

  4. Which Pandas method is used to load data from a CSV file into a DataFrame?
    a) read_csv()
    b) load_data()
    c) import_csv()

  5. How can you access the first 5 rows of a DataFrame named df in Pandas?
    a) df.head()
    b) df.first()
    c) df[:5]

  6. What Pandas function is used to calculate summary statistics like mean, median, and standard deviation for numerical columns?
    a) describe()
    b) summary()
    c) statistics()

  7. To drop a column named ‘column_name’ from a DataFrame ‘df’, which method would you use?
    a) df.remove_column('column_name')
    b) df.drop('column_name', axis=1)
    c) df.delete('column_name')

  8. What is the default index type in a Pandas DataFrame?
    a) Numeric
    b) Alphanumeric
    c) None

  9. Which Pandas method is used to fill missing values in a DataFrame with a specific value or method?
    a) replace()
    b) fillna()
    c) remove_nulls()

  10. What Pandas function is used to group data based on one or more columns and perform aggregate operations?
    a) group()
    b) agg()
    c) groupby()

All the best.

1 Like