@premsheth wrote:
Hi friends,
Need your help again.
df = pd.DataFrame({"A": ['I love cooking'], "B": [['cooking','rowing']]}) df A B 0 I love cooking [cooking, rowing]
df['A']
output:
0 I love cooking
Name: A, dtype: object
Now I want to use
df['A']
as input in user define function but it gives me error:
'Series' object has no attribute 'split'
if I write manually in function input it works but when I try to pass dataframe element it gives me error
How can I pass element in function?
I tried pandas’s
to_string()
function,astype()
function but no luckif someone know how can I use direct element in function please let me know.
Thanks in Advance
Posts: 2
Participants: 1