Advertisements
Advertisements
प्रश्न
Write a Python program to create a Pandas Series as shown below using a ndarray, where the subject names are the indices and the corresponding marks are the values in the series.
| Mathematics | 85 |
| Science | 90 |
| English | 78 |
| History | 88 |
कोड लेखन
Advertisements
उत्तर
import pandas as pd
import numpy as np
marks = np.array([85, 90, 78, 88])
series = pd.Series(marks, index=['Mathematics', 'Science', 'English', 'History'])
print(series)shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
