Here is what I have, a list with 8 values, and want to split into 4 columns, which means I'd get 2 rows:
list = ['Jan 01 2020', '51.62', '51.87', '50.69', 'Jan 02 2020', '51.98', '52.14', '51.48']
columnNames = ['Date', 'A', 'B', 'C']
And, here what I expect to get:
Date A B C
Jan 01 2020 51.62 51.87 50.69
Jan 02 2020 51.98 52.14 51.48
I tried this, but I don't know how to make it jump to another row after reading 4th, 8th, 12th,... value (I have a way bigger list actually)
import pandas as pd
list = ['Jan 01 2020', '51.62', '51.87', '50.69', 'Jan 02 2020', '51.98', '52.14', '51.48']
columnNames = ['Date', 'A', 'B', 'C']
df = pd.DataFrame(list, columns = columnNames)
print(df)
