## Introduction

Pandas is software that helps people analyze and change data. It has lots of tools and things to use that can help scientists and engineers work with data. This article talks about some common questions people might get asked about Pandas in a job interview. We divided the questions into Easy, Medium, and Hard sections so that it's easier to understand. Our goal is to help you be ready to answer any Pandas questions you might get asked in an interview.

## Pandas Interview Questions and Answers for Freshers

This section will get the basic pandas interview questions to build a solid foundation. This section is crucial since it establishes a strong base.

### 1. Explain Python Pandas?

**Ans:** Python Pandas is a data analysis and manipulation software library built by **Wes McKinney**. It is an open-source, cross-platform library. It provides data structures and procedures for numerical and time series data manipulation. It makes machine learning algorithms easy to implement.

### 2. What is the use of Python Pandas?

**Ans:** It is used for data analysis, time series manipulation, and table management. It is specially designed for the Python programming language.

### 3. Define series in Pandas?

**Ans:** It is a one-dimensional array of objects of any data type. Using the 'series'

method, you can convert any list, tuple, and dictionary into a series. A series cannot have a column. The row labels of the series are called indexes.

### 4. What are the types of data structures available in Pandas?

**Ans:** Pandas provides two types of data structures built on top of NumPy. These are

- series and DataFrames.
- Series are one-dimensional, whereas DataFrames are two-dimensional data types.

### 5. What are the critical features of Pandas?

**Ans:** The features of Pandas library are:

- Time Series
- Data Alignment
- Merge and Join
- Reshaping
- Memory efficient

### 6.**How can the standard deviation be calculated from the Series?**

**Ans: **In pandas, you can calculate the standard deviation of a Series using the .std() method. For example:

```
import pandas as pd
data = pd.Series([1, 2, 3, 4, 5])
std_deviation = data.std()
```

Here, std_deviation will contain the standard deviation of the data in the Series.

### 7. Define DataFrames in Pandas?

**Ans:** A DataFrame is an extensively used data structure in Pandas and works with 2-D arrays with labelled axes. It is a standard storing data with row and column indices. The columns can store heterogeneous data such as int and bool. It can be viewed as a dictionary of series data structures.

### 8. What is the time series in Pandas?

**Ans:** Time series is an organised collection of data points showing a quantity's evolution over time. Pandas are extremely capable and have the tools to work with time series data from various fields.

Functions provided by Pandas:

- Create date and time sequences using preset frequencies
- Date and time manipulation supported by timezone feature
- Conversion of time series to a given frequency or to resample
- Analysing time series data from several sources
- Calculating date and time in absolute or relative terms

### 9. Explain reindexing in Pandas?

**Ans:** Reindexing allows the assignment of new indices and has configurable filling logic. It injects NA/NaN in the areas where the elements are missing from the last index. It returns an object unless the new index is equivalent to the current one, and the value of the copy becomes false. It is used to alter the index of the rows and columns of the DataFrame.

### 10. Explain MultiIndexing in Pandas.

**Ans:** MultiIndexing in Pandas allows us to have multi-levels of row and column labels which provide a way to analyze and represent data. With the help of MultiIndexing, one can organize the data in a tabular format with multiple features.

### 11. What is TimeDelta?

**Ans:** TimeDelta is a data type in Python. It represents the duration or difference between two points in time. TimeDelta is mainly used to perform arithmetic operations involving dates and times. It can be positive or negative and can store values for days, seconds, minutes, hours, and weeks.

### 12. How to create a series from a dictionary in Pandas?

**Ans:** The Series() method is used without the index parameter to create a series.

### 13. Which library tool is used to create a scatter plot matrix?

**Ans:** **Scatter_matrix** is used for this purpose.