To display first three elements of a series objects, you may write
Answers
Answered by
8
Answer:
HOPE THIS HELP YOU
Attachments:
![](https://hi-static.z-dn.net/files/d54/eda59c1a277f3459d54450a449e3b541.png)
Answered by
0
Answer:Answer is in explanation
Explanation:
import pandas as pd
import numpy as np
# creating simple array
data = np.array(['g', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'g', 'e', 'e', 'k', 's'])
ser = pd.Series(data)
# retrieve the first element
print(ser[:3])
Similar questions