I'm trying to insert multiple values in a single cell of pandas data frame using the below code.
Importing the libraries
import pandas as pd
import numpy as np
#Declaring the list
lst = ['accuracy score: 0.550', 'accuracy score: 0.700', 'accuracy score: 0.730', 'accuracy score: 0.730']
fold = ['10']
#Convert the list to pandas dataframe
df = pd.DataFrame(list(zip(lst,fold)),columns =['Accuracy','Folds'])
df.head()
However, when I execute the above code, it returns the df as below :
| Accuracy | Folds |
+-----------------------+--------+
|accuracy score: 0.550 | 10 |
+-----------------------+--------+
But I want to have the df that looks like below where in the accuracy values are stored under a single cell in pandas dataframe:
So, how can I store the 4 values under a single row using pandas dataframe ?
