WorksheetsPandas Series-1
Total questions: 21
Worksheet time: 11mins
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
Series.head() will return how many rows.
2
3
4
5
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
Series in Pandas is
1 Dimensional Array
2 Dimensional array
3 Dimensional array
none of above
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
Series can be created from
Array
Dictionary
Scatter value
All of them
Which package should be needed for series
Maths
Statistic
Pandas
Random
Full form of NaN is
Not a Null
Not a Number
Not a Numeric
None of these
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
write the output:
import pandas as pd1
s = pd1.Series([1,2,3])
t = pd1.Series([1,2,4])
u=s-t
print (u)
0 1
1 0
2 1
dtype: int64
0 0
1 0
2 1
dtype: int64
0 0
1 0
2 -1
dtype: float64
0 0
1 0
2 -1
dtype: int64
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.iloc[2:4])
b 2
c 3
d 4
dtype: int64
b 3
c 4
dtype: int64
c 3
d 4
dtype: int64
none of the above
write the output:
import pandas as pd
s=pd.Series([1,2,3,4],index=['a','b','c','d'])
print(s.loc['b':'d'])
b 2
c 3
d 4
dtype: float64
b 2
c 3
d 4
dtype: object
c 3
d 4
dtype: int64
b 2
c 3
d 4
dtype: int64
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.
Give the output of the following code:
>>>import pandas as pd
>>>dict1 = {'AR' : 100, 'VR' : 200, 'AI' : 300}
>>>ser = pd.Series(dict1)
>>>print(ser[1])
AR
100
VR
200
print(ser[2,4])
print(ser[[2:4]])
print(ser[[2,4]])
print(ser[2,3,4])
Which of the following commands is used to install Pandas?
pip install python-pandas
pip install pandas
python install python
python install pandas
print(ser[[1,3]])
print(ser[1:3])
print(ser[[1:3]])
print(ser[1,3])
Have you enjoyed the quiz on Pandas Series?
Yes
No
