@requires_pandas
def test_to_data_frame():
 raw = read_raw_fif(test_fif_fname, preload=True)
 (_, times) = raw[0, :10]
 df = raw.to_data_frame()
 assert_true((df.columns == raw.ch_names).all())
 assert_array_equal(np.round((times * 1000.0)), df.index.values[:10])
 df = raw.to_data_frame(index=None)
 assert_true(('time' in df.index.names))
 assert_array_equal(df.values[:, 0], (raw._data[0] * 10000000000000.0))
 assert_array_equal(df.values[:, 2], (raw._data[2] * 1000000000000000.0))

@ requires_pandas def test_to_data_frame ( ) : raw = read_raw_fif ( test_fif_fname , preload = True ) ( _ , times ) = raw [ 0 , : 10 ] df = raw . to_data_frame ( ) assert_true ( ( df . columns == raw . ch_names ) . all ( ) ) assert_array_equal ( np . round ( ( times * 1000.0 ) ) , df . index . values [ : 10 ] ) df = raw . to_data_frame ( index = None ) assert_true ( ( 'time' in df . index . names ) ) assert_array_equal ( df . values [ : , 0 ] , ( raw . _data [ 0 ] * 10000000000000.0 ) ) assert_array_equal ( df . values [ : , 2 ] , ( raw . _data [ 2 ] * 1000000000000000.0 ) )
test evoked pandas exporter .