Hi,
I have a base64 decode string as below:
"x1,x2,x3\n0.24618513599536662,0.23036110161948198,0.9708518314384857\n0.4445749933364773,0.15059006972987765,0.5374581217858532\n0.6655769723982281,0.5742142837354622,0.5040778403014019\n"
How can I convert it to data frame as below?
3×3 DataFrame
Row │ x1 x2 x3
│ Float64 Float64 Float64
─────┼──────────────────────────────
1 │ 0.246185 0.230361 0.970852
2 │ 0.444575 0.15059 0.537458
3 │ 0.665577 0.574214 0.504078
Thanks in Advance !
Manu
nilshg
2
CSV.jl will happily read from an IOBuffer
:
julia> using CSV, DataFrames
julia> CSV.read(IOBuffer("x1,x2,x3\n0.24618513599536662,0.23036110161948198,0.9708518314384857\n0.4445749933364773,0.15059006972987765,0.5374581217858532\n0.6655769723982281,0.5742142837354622,0.5040778403014019\n"),
DataFrame)
3×3 DataFrame
Row │ x1 x2 x3
│ Float64 Float64 Float64
─────┼──────────────────────────────
1 │ 0.246185 0.230361 0.970852
2 │ 0.444575 0.15059 0.537458
3 │ 0.665577 0.574214 0.504078
2 Likes
@nilshg Awesome… Thank you