CBSE Class 12 Informatics Practices
Question 147 of 167
Python Pandas — I — Question 1
Back to all questions 1
Question Write Python code to create a Series object Temp1 that stores temperatures of seven days in it. Take any random seven temperatures.
import pandas as pd
temperatures = [28.0, 30.4, 26.5, 29.4, 27.0, 31.2, 25.8]
Temp1 = pd.Series(temperatures)
print(Temp1)0 28.0
1 30.4
2 26.5
3 29.4
4 27.0
5 31.2
6 25.8
dtype: float64