Re: Convert a line of String into column

2019-10-05 Thread ayan guha
Do you know how many columns? On Sat, Oct 5, 2019 at 6:39 PM Dhaval Modi wrote: > Hi, > > 1st convert "lines" to dataframe. You will get one column with original > string in one row. > > Post this, use string split on this column to convert to Array of String. > > After This, you can use

Re: Convert a line of String into column

2019-10-05 Thread Dhaval Modi
Hi, 1st convert "lines" to dataframe. You will get one column with original string in one row. Post this, use string split on this column to convert to Array of String. After This, you can use explode function to have each element of the array as columns. On Wed 2 Oct, 2019, 03:18 , wrote:

Convert a line of String into column

2019-10-01 Thread hamishberridge
I want to convert a line of String to a table. For instance, I want to convert following line ... # this is a line in a text file, separated by a white space to table +-+--++--+ |col1| col2| col3...|col6| +-+-+-+-+ |val1|val2|val3|val6|