Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- ser = pd.Series(np.random.randint(0,10,5))
- ser
- #o/p:
- #0 1
- #1 8
- #2 9
- #3 2
- #4 6
- #dtype: int32
- ser = pd.Series(np.random.randint(0,10,5),index=['Tomatoes','Potato','Eggs','Onions','Garlic'])
- ser
- #o/p:
- #Tomatoes 9
- #Potato 7
- #Eggs 3
- #Onions 8
- #Garlic 9
- #dtype: int32
Add Comment
Please, Sign In to add comment