Advertisements
Advertisements
Question
Create the following series and do the specified operation:
Friends, from a dictionary having roll numbers of five of your friends as data and their first name as keys.
Code Writing
Advertisements
Solution
import pandas as pd
Friends = pd.Series({'Amit': 101, 'Rahul': 102, 'Priya': 103, 'Neha': 104, 'Rohan': 105})
print(Friends)
Output:
| Amit | 101 |
| Rahul | 102 |
| Priya | 103 |
| Neha | 104 |
| Rohan | 105 |
| dtype | int64 |
shaalaa.com
Is there an error in this question or solution?
