J'ai le dataframe pandas suivant :
df11 = pd.DataFrame(columns=["col1", "col2", "col3"])
df11.loc[1] = [2,["a","q","v"],["g","h","v"]]
df11.loc[2] = [21,["b","z","o"],["h"]]
df11.loc[3] = [11,["g","s","v"],["g","h","v"]]
df11.loc[4] = [2,["a","q","v"],["n","m","k","p"]]
Comment puis-je remplacer les tableaux dans col2 et col3 avec leur équivalent en chaîne de caractères ? comme ceci :
df11 = pd.DataFrame(columns=["col1", "col2", "col3"])
df11.loc[1] = [2,"a,q,v","g,h,v"]
df11.loc[2] = [21,"b,z,o","h"]
df11.loc[3] = [11,"g,s,v","g,h,v"]
df11.loc[4] = [2,"a,q,v","n,m,k,p"]