Code >
file.py
import pandas as pd
import numpy as np
data = np.array(['Dwayne','John','Steve','Hulk','Orton','Leo','Kofi'])
ser = pd.Series(data)
print(ser[:3])
Output >
Output
Dwayne
John
Steve
Code >
import pandas as pd
import numpy as np
data = np.array(['Dwayne','John','Steve','Hulk','Orton','Leo','Kofi'])
ser = pd.Series(data)
print(ser[:3])
Output >
Dwayne
John
Steve