CBSE Class 12 Informatics Practices
Question 159 of 167
Python Pandas — I — Question 13
Back to all questions 13
Question Write code to print all the information about a Series object.
import pandas as pd
s = pd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])
print(s)
s.info()a 1
b 2
c 3
d 4
dtype: int64
<class 'pandas.core.series.Series'>
Index: 4 entries, a to d
Series name: None
Non-Null Count Dtype
-------------- -----
4 non-null int64
dtypes: int64(1)
memory usage: 64.0+ bytes