1.
CSV refers to tabular data saved as plain text where data values are separated by commas.
Correct Answer
A. True
Explanation
The given statement is true. CSV stands for Comma-Separated Values, which refers to a file format used to store tabular data as plain text. In a CSV file, each line represents a row of data, and the values within each row are separated by commas. This format is commonly used for transferring data between different software applications, as it is simple and widely supported.
2.
Read_csv() method automatically takes the last row of the CSV file.
Correct Answer
B. False
Explanation
The given statement is false. The read_csv() method does not automatically take the last row of the CSV file. By default, it reads all the rows in the file and returns the data as a DataFrame. If you want to read only a specific number of rows or skip certain rows, you can use the parameters provided by the read_csv() method.
3.
Full form of csv is common separated value.
Correct Answer
B. False
Explanation
The given statement is incorrect. The correct full form of CSV is "Comma Separated Values," not "common separated value." CSV is a file format that is used to store tabular data, where each value is separated by a comma.
4.
DataFrame in pandas is:
Correct Answer
B. 2 dimensional array
Explanation
A DataFrame in pandas is a 2-dimensional array. It is a tabular data structure that consists of rows and columns, similar to a spreadsheet or SQL table. Each column in the DataFrame represents a variable, while each row represents an observation or record. This structure allows for easy manipulation, analysis, and visualization of data.
5.
Series in pandas is:
Correct Answer
A. 1 dimensional array
Explanation
A pandas Series is a one-dimensional array-like object that can hold any data type. It is similar to a column in a spreadsheet or a SQL table. Each element in the Series has a unique label called an index, which allows for easy and efficient data manipulation and analysis. Therefore, the correct answer is that a Series in pandas is a one-dimensional array.
6.
We can analyze the data in pandas with:
Correct Answer
C. Both of these
Explanation
The correct answer is "Both of these" because pandas is a powerful data manipulation and analysis library in Python that provides two main data structures: Series and DataFrame. A Series is a one-dimensional labeled array that can hold any data type, while a DataFrame is a two-dimensional labeled data structure with columns of potentially different types. By using both Series and DataFrame, we can effectively analyze and manipulate data in pandas.
7.
import pandas as pd
s = pd.Series([1,2,3,4,5],index = ['a','b','c','d','e'])
print s['a']
Correct Answer
A. 1
Explanation
The code snippet creates a pandas Series object with values [1,2,3,4,5] and indexes ['a','b','c','d','e']. The line "print s['a']" accesses the value at index 'a' in the Series, which is 1.
8.
Which of the following thing can be data in Pandas?
Correct Answer
D. All of these
Explanation
All of these can be data in Pandas because Pandas is a powerful data manipulation library in Python that provides data structures and functions to efficiently handle and analyze data. It can handle various types of data such as python dictionaries, ndarrays (n-dimensional arrays), and scalar values. Pandas allows for easy data manipulation, cleaning, and analysis, making it a versatile tool for working with different types of data.
9.
Pandas is an open-source _______ Library?
Correct Answer
D. Python
Explanation
Pandas is an open-source library primarily used for data manipulation and analysis in Python. It provides data structures and functions that allow users to efficiently work with structured data, such as CSV files or SQL tables. Pandas is widely popular in the data science and analytics community due to its powerful capabilities and ease of use. It offers a wide range of data manipulation and analysis tools, making it an essential library for anyone working with data in Python.
10.
Which of the following is correct Features of DataFrame?
Correct Answer
D. All of the above
Explanation
The correct answer is All of the above. This is because a DataFrame in pandas can have columns of different types, allowing for flexibility in data representation. It also allows for performing arithmetic operations on rows and columns, making it easy to manipulate and analyze the data. Additionally, a DataFrame has labeled axes for both rows and columns, which helps in accessing and organizing the data efficiently. Therefore, all of the given features are correct for a DataFrame.