I have the following code:
sample_data = OrderedDict((df.name, df['col'].sample(n=3)) for df in test_cases[1:])
sample = pd.DataFrame(sample_data)
Which gives the following dataframe:
col1 col2
A NaN
P NaN
NaN E
NaN R
U NaN
NaN Y
How do I get the following dataframe:
col1 col2
A E
P R
U Y