CBSE Class 12 Informatics Practices Question 163 of 167

Python Pandas — I — Question 17

Back to all questions
17
Question

Question 13

Write a program to create a Series object that stores the table of number 5.

Solution
import pandas as pd
import numpy as np
arr = np.arange(1, 11)
s = pd.Series(arr * 5)
print(s)
Output
0     5
1    10
2    15
3    20
4    25
5    30
6    35
7    40
8    45
9    50
dtype: int32
Answer