Part 2 - Pandas MCQ Questions | Data Science MCQ Questions | Python Lib

preview_player
Показать описание
#python #interviewquestions #pandas

Pandas was created in 2008, by Wes McKinney.
In 2012, Pandas became an open-source project, it gained popularity within the Python community. And become one of the most widely used libraries in the Python ecosystem.
Pandas became an essential tool in data analysis, data science to handle and analyze financial data efficiently.
Pandas is built on top of the NumPy library.
Рекомендации по теме
Комментарии
Автор

Answers

1. How do you create a Series from a list in Pandas?
A. pd.Series.from_list()

2. How do you access the first element of a Series?
A. series[0]

3. How do you access the last element of a Series?
A. series[-1]

4. How do you get the number of elements in a Series?
C. series.count()

5. How do you create a DataFrame from a dictionary in Pandas?
C. pd.DataFrame.from_dict()

6. How do you select a column named "Age" from a DataFrame named "df"?
C. df["Age"]

7. How do you drop a column named "Salary" from a DataFrame named "df"?
C. df.drop(columns="Salary")

8. What is the function used to calculate summary statistics for a DataFrame?
A. describe()

9. What is the function used to rename columns in a DataFrame?
B. rename()

10. How do you drop rows with missing values in a DataFrame?
A. df.dropna()

TecTute
join shbcf.ru