I have the following dataframe:
[['M', 'A', '0', '0.2', '0.2', '0.2'],
[nan, nan, nan, '0.3', '0.3', '1'],
[nan, nan, nan, '1.4', '3.2', '32'],
[nan, nan, nan, nan, nan, nan],
[nan, nan, nan, nan, nan, nan],
['sex', 'test', 'conc', 'sugar', 'flour', 'yeast'],
['M', 'A', '3', '1.2', '1.2', '1.2'],
[nan, nan, nan, '1.3', '1.3', '2'],
[nan, nan, nan, '2.4', '4.2', '33'],
[nan, nan, nan, nan, nan, nan],
['sex', 'test', 'conc', 'sugar', 'flour', 'yeast'],
['M', 'A', '6', '2.2', '2.2', '2.2'],
[nan, nan, nan, '2.3', '2.3', '3'],
[nan, nan, nan, '3.4', '5.2', '34']]
I'd like to split it when a row is all nans, into multiple dataframes. I've tried the following code from the link below, and it does as I think I want it to do, but it appears to return a list of the splits. How do I get each one into its individual dataframe, so I'd have multiple dataframes?
df_list = np.split(df, df[df.isnull().all(1)].index)
for df in df_list:
print(df, '\n')