To display first three elements of a series objects, you may write
Answers
Answered by
8
Answer:
HOPE THIS HELP YOU
Attachments:
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