Spilt column and save into different column

ho


SOLVE E PART

Sounds like you want each row to become a column?

df_transpose = DataFrame(permutedims(Matrix(df), (2,1)))

Is this a homework problem? What have you tried and why did it not work?

2 Likes

I TRIED TO CONVERT INTO STRING
AND THEN TRIED TO SAVE INTO DIFFERENT COLUMNS
foreach(enumerate([:DELAY1,:DELAY2,:DELAY3 ))do(i,n)
df[!,n] = getindex.(data,i)
end
BUT IT SHOW BOUND ERROR:SHOW GETINDEX TRIED TO ACESS [1] ELEMENT AT 2ND POSTION

well yes this is my assignment and i have need help for solving in e part

JUST AFTER CONVERSION I USE SPILT
DATA=SPLIT.(DF.RecentDelays,‘,’)

1 Like

Please quote your code using triple backticks ( ``` code ```) to make it easier to read.

The error is telling you that you’re trying to access the second element of a length-1 vector, so you need to change your approach to take into account the length of each element in the RecentDelays column before accessing it.

Take a look at this recent blog post?

2 Likes

cant understand the approach
can u code this??
i am using julia 1.4