I would like to replace a string column's "." with "," in a dask_cudf dataframe.
example
tdf = cudf.DataFrame("A":["x.y", "a.b"])
temp = dask_cudf.from_cudf(tdf, npartitions=1)
temp["A"] = temp["A"].str.split(".", expand=False)
temp.head(2)
I got:
A
0 [x, y]
1 [a, b]
I need:
A
0 x,y
1 a,b
I have tried :
temp = temp["A"].str.split(".", expand=False).join(sep=",")
temp.head(2)
I got error:
"Series" object has no attribute "join".
How can I do this kind of replacement ? thanks
don't use
split, usestr.replacetdf['A'] = tdf['A'].str.replace('.',',')outputs: