0% found this document useful (0 votes)
4 views

Python for Data Science PART 1

The document contains a series of important questions and answers related to Python for Data Science, focusing on libraries such as Pandas, NumPy, and Matplotlib. Key topics include data manipulation, visualization, and machine learning algorithms. It also mentions the availability of a PDF with all questions and encourages viewers to subscribe for more content.

Uploaded by

sboy76385
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python for Data Science PART 1

The document contains a series of important questions and answers related to Python for Data Science, focusing on libraries such as Pandas, NumPy, and Matplotlib. Key topics include data manipulation, visualization, and machine learning algorithms. It also mentions the availability of a PDF with all questions and encourages viewers to subscribe for more content.

Uploaded by

sboy76385
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Python for Data Science IIT Kharagpur

Python For Data Science

IMP QUESTIONS PART 1

Question 1:
Which library is commonly used for data manipulation and analysis in
Python?
A) NumPy

AM
B) Matplotlib
C) Pandas
D) Scikit-Learn

AY
Accepted Answer: C) Pandas

Question 2:
SW
What does the `import pandas as pd` statement do?
A) Imports the pandas library and renames it as pd for easier use
B) Imports the pandas library and assigns it to a variable pd
C) Imports the pandas package and creates an alias called pd
D) Imports the pandas module and uses it as pd
Y

Accepted Answer: A) Imports the pandas library and renames it as pd for


M

easier use
@

Question 3:
Which data structure in Pandas is used for one-dimensional labeled data?
A) DataFrame
B) Series
C) Array
D) Dictionary

Accepted Answer: B) Series

Page 1 MY SWAYAM
Python for Data Science IIT Kharagpur

Question 4:
What does the `matplotlib.pyplot` library in Python provide?
A) Data analysis tools
B) Machine learning algorithms
C) Data visualization tools
D) Statistical functions

Accepted Answer: C) Data visualization tools

AM
Question 5:
What is the purpose of NumPy in Python for data science?
A) Data visualization
AY
B) Data manipulation and analysis
C) Machine learning algorithms
D) Scientific computing and working with arrays
SW

Accepted Answer: D) Scientific computing and working with arrays

Question 6:
Y

Which of the following statements creates a NumPy array?


A) `numpy.array([1, 2, 3])`
M

B) `array([1, 2, 3])`
C) `create.array([1, 2, 3])`
@

D) `np.create([1, 2, 3])`

Accepted Answer: A) `numpy.array([1, 2, 3])`

Page 2 MY SWAYAM
Python for Data Science IIT Kharagpur

Question 7:
In Python, what is the purpose of the `iloc` attribute in Pandas?
A) It selects rows and columns by index
B) It performs element-wise operations
C) It converts data to a NumPy array
D) It plots data using Matplotlib

Accepted Answer: A) It selects rows and columns by index

AM
Question 8:
Which library provides machine learning algorithms in Python?
A) Pandas
B) NumPy
C) Scikit-Learn
D) Matplotlib
AY
SW
Accepted Answer: C) Scikit-Learn

Question 9:
What is the output of `print(2 3)` in Python?
Y

A) 5
B) 8
M

C) 6
D) 2
@

Accepted Answer: B) 8

Page 3 MY SWAYAM
Python for Data Science IIT Kharagpur

Question 10:
What does the `random` module in Python provide?
A) Functions for generating random numbers and samples
B) Functions for mathematical calculations
C) Functions for sorting data
D) Functions for working with strings

Accepted Answer: A) Functions for generating random numbers and


samples

AM
Question 11:
Which of the following is used for conditional filtering in Pandas
DataFrame?
A) `select()`
B) `filter()`
C) `query()`
AY
SW
D) `search()`

Accepted Answer: C) `query()`

Question 12:
Y

What is the purpose of the `map()` function in Python?


A) To apply a function to all items in an input list or iterable
M

B) To sort a list in ascending order


C) To remove elements from a list
@

D) To calculate the length of a list

Accepted Answer: A) To apply a function to all items in an input list or


iterable

Page 4 MY SWAYAM
Python for Data Science IIT Kharagpur

Question 13:
Which of the following is used for missing data imputation in Pandas
DataFrame?
A) `replace()`
B) `impute()`
C) `fill()`
D) `fillna()`

Accepted Answer: D) `fillna()`

AM
Question 14:
What does the `head()` method in Pandas DataFrame do?
A) Displays the last few rows of the DataFrame

AY
B) Displays the first few rows of the DataFrame
C) Removes duplicate rows from the DataFrame
D) Calculates the mean of each column in the DataFrame
SW

Accepted Answer: B) Displays the first few rows of the DataFrame

Question 15:
Which of the following is used to install external packages in Python?
Y

A) `install package_name`
M

B) `get package_name`
C) `import package_name`
D) `pip install package_name`
@

Accepted Answer: D) `pip install package_name`

Page 5 MY SWAYAM
Python for Data Science IIT Kharagpur

Question 16:
Which library is commonly used for advanced data visualization in Python?
A) Pandas
B) Seaborn
C) NumPy
D) Scikit-Learn

Accepted Answer: B) Seaborn

AM
Subscribe for

PART 2 AND 3

AY MY SWAYAM
SW

PDF OF ALL ABOVE QUESTIONS IS AVAILABLE IN THE


DESCRIPTION BOX OF THIS VIDEO.

WANT TO PART 2, COMMENT BELOW AND SUBSCRIBE THIS


Y

YOUTUBE CHANNEL “MY SWAYAM”


M

HAPPY LEARNING
THANK YOU.
@

Page 6 MY SWAYAM

You might also like