Q. Write a program to create a Series object from an ndarray that stores characters from 'a' to 'g'.
You can understand by Watching video :-
Answer =
import pandas as pd import numpy as np arr = np.array(list('abcdef')) print(arr) s1 = pd.Series(arr)
Output :-
['a' 'b' 'c' 'd' 'e' 'f']
0 a
1 b
2 c
3 d
4 e
5 f
dtype: object
>>>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )