Font size
Worksheetspython-series
Total questions: 20
Worksheet time: 10mins
Which is true for series.
Size is mutable,Values is mutable
size is immutable,values is mutable
size is mutable,values is immutable.
none
Series.tail(3) will return how many values.
3 values from front
3 values from last
5 values
none
To extract subset from Series,the following function is used
row()
column()
loc()
all
we can analyze the data in pandas with :
Series
Dataframe
Both
none
Minimum number of argument we require to pass in pandas series ?
0
1
2
3
Minimum number of argument we require to pass in pandas series ?
0
1
2
3
Which is not a feature of series
Homogeneous data
Immutable size
Mutable data
Multiple rows
Full form of NaN is
Not a Null
Not a Number
Not a Numeric
None of these
Full form of NaN is
Not a Null
Not a Number
Not a Numeric
None of these
Data structures in Pandas can be mutated in the terms of ____ but not of _____.
size, value
value, size
semantic, size
none of the above
Write the output for the following:
import pandas as pd1
s = pd1.Series(5, index=[0, 1, 2, 3])
print(s)
0 5
0 5
1 5
2 5
3 5
dtype: int64
1 5
2 5
2 5
4 5
dtype: int64
0 5
1 5
2 5
3 5
dtype: object
____iterates over the DataFrame columns, returning a tuple with the column name and the content as a Series.
____returns a tuple with row index and row data as a Series object.
df.items(), df.iterrows()
df.iterrows(), df.items()
Pandas is_________.
a Python library that is built on NumPy and provides easy-to-use data structures and data analysis tools for the Python programming language.
a Python 2D plotting library which produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms.
a Python library that implements a range of machine learning,
preprocessing, cross-validation and visualization algorithms using a unified interface.
Best way to import the pandas module in your program ?
1.import pandas
2.import pandas as pd
3.from pandas import *
4.All of the above
Which of the following object you get after reading CSV file?
a) DataFrame
b) Character Vector
c) Panel
d) All of the mentioned
Series can be created from
Array
Dictionary
Scaler value
All of them
Pandas is the most popular library in the scientific Python ecosystem for doing data analysis.
True
False
To get the number of dimensions of a Series object, ____________ attribute is displayed
itemsize
size
index
ndim
To check if the Series object contains NAN values, _____________ attribute is displayed.
hasnans
nbytes
ndim
dtype
To get the number of bytes of the Series Data, ___________________ attribute is used.
index
size
itemsize
ndim
