How to convert all rows of a column to numpy array format in a pandas dataframe? A sample dataframe:

df=pd.DataFrame({
"actual":["1,0,0,1","0,0,1,0"],
"predicted":["[1,0,0,0]","[0,1,1,1]"]
})
Ideal data frame:
I tried to convert the actual column to array format using the code below but failed.
df['actual']=df.actual(lambda x: np.array([int(s) for s in x.to_numpy().split(',')]))

