Computer Science – Series, Exams of Computer science

Computer Science – Series – 12 Viva Questions with Answers - 3 Pages – Helpful for Students and Teachers

Typology: Exams

2024/2025

Available from 09/09/2024

kbzone1973
kbzone1973 🇮🇳

244 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Series | Vineeta Garg
1
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
Structure
Dimensions
Description
Series
1
1D labeled homogeneous, data-
mutable, size-immutable array.
Data
Frames
2
2D labeled heterogeneous, data-
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.
pf3

Partial preview of the text

Download Computer Science – Series and more Exams Computer science in PDF only on Docsity!

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 Structure Dimensions Description Series (^1) 1D labeled homogeneous, data- mutable, size-immutable array. Data Frames 2 2D labeled heterogeneous, data- 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.

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) Here, entire series is displayed with False value at places where value<=10 and True value at places where value>10. 0 False 1 False 2 False 3 True 4 True 5 True dtype: bool print(ser1[ser1>10]) Here, elements with value>10 are displayed.

dtype: int

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()