res = df.set_index(['subject', 'trial_num'])['samples'].apply(pd.Series).stack(
    )
res = res.reset_index()
res.columns = ['subject', 'trial_num', 'sample_num', 'sample']
res
pandas: When cell contents are lists, create a row for each element in the list