@requires_pandas
def test_to_data_frame():
    ave = read_evokeds(fname, 0)
    assert_raises(ValueError, ave.to_data_frame, picks=np.arange(400))
    df = ave.to_data_frame()
    assert_true((df.columns == ave.ch_names).all())
    df = ave.to_data_frame(index=None).reset_index('time')
    assert_true('time' in df.columns)
    assert_array_equal(df.values[:, 1], ave.data[0] * 1e13)
    assert_array_equal(df.values[:, 3], ave.data[2] * 1e15)
Test evoked Pandas exporter
dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_evoked.py/test_to_data_frame