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

VivaSeries

The document provides an overview of the Pandas library in Python, focusing on its Series data structure, which is a one-dimensional labeled array for holding homogeneous data. It compares Series, DataFrames, and Panel, detailing their dimensions and characteristics, and explains various operations and functions applicable to Series, such as indexing, filtering, and aggregation. Additionally, it highlights the use of Boolean indexing and the differences between head() and tail() functions.

Uploaded by

bhuvimongia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

VivaSeries

The document provides an overview of the Pandas library in Python, focusing on its Series data structure, which is a one-dimensional labeled array for holding homogeneous data. It compares Series, DataFrames, and Panel, detailing their dimensions and characteristics, and explains various operations and functions applicable to Series, such as indexing, filtering, and aggregation. Additionally, it highlights the use of Boolean indexing and the differences between head() and tail() functions.

Uploaded by

bhuvimongia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Series | Vineeta Garg

SERIES
VIVA QUESTIONS
1. What is Pandas?
Pandas is a software library for the Python programming language written by Wes
McKinney for data manipulation and analysis. The name Pandas is derived from the
term “Panel Data”. It is an open source and free to use.

2. Compare Series, DataFrames and Panel?

Data Dimensions Description


Structure

Series 1 1D labeled homogeneous, data-


mutable, size-immutable array.

Data 2 2D labeled heterogeneous, data-


Frames mutable, size-mutable array.

Panel 3 3D labeled, data-mutable, size-mutable


array.

3. What is a series?

• Series is a one-dimensional labeled array capable of holding homogenous


data of any type (integer, string, float etc.).
• The data labels in series are numeric starting from 0 by default. The data
labels are called as indexes.
• The data in series is mutable i.e. it can be changed but the size of series is
immutable i.e. size of the series cannot be changed.

4. Name the parameter which is used to give name to the series?

name parameter in Series method

5. How can we create customized index values in series?

We can create customized index values using index parameter in Series method.
6. What happens when dictionary is used to create a series?
Dictionary keys are used to construct indexes and dictionary values are used to
make elements of a series.

1
Series | Vineeta Garg

7. What is the difference between Positional indexes and Label


indexes?
Positional indexes are used to extract a data element present at a particular
index location from a series. The index operator [ ] along with the index number
can be used to access an element in a series.
Label indexes are used to extract a data element present at a particular index
label from a series. The index operator [ ] along with the label index can be used
to access an element in a series.
8. What is a Boolean indexing?
Boolean indexing is a type of indexing which uses actual values of the data in
the Series. Using Boolean indexing we can filter data by applying certain
condition on data using relational operators like ==, >, <, <=, >= and logical
operators like ~(not), &(and) and |(or).

9. Consider a series having values: 2,5,9,12,34,56. What is the difference


between print(ser1>10) and print(ser1[ser1>10])?
print(ser1>10) 0 False
1 False
Here, entire series is 2 False
displayed with False 3 True
value at places where 4 True
value<=10 and True 5 True
value at places where dtype: bool
value>10.
print(ser1[ser1>10]) 3 12
4 34
Here, elements with 5 56
value>10 are dtype: int64
displayed.

10. What is the difference between head() and tail() functions?


The head function is used to return a specified number of rows from the
beginning of a Series.
The tail function is used to return a specified number of rows from the end of
a Series.

11. By default how many rows are displayed by head() and tail()
functions?
5

12. Name the functions used to perform the following operations on


series:

Operations on series Functions


To add all values present in a series sum()
To multiply all values present in a series prod()

2
Series | Vineeta Garg

To find the mean of all values present in a series mean()


To find the minimum of all values present in a series min()
To find the maximum of all values present in a series max()
To count the number of values, present in a series count()
To return the sorted series(ascending=True/False) sort_values()
To check for missing data on Series object isnull()

You might also like