def test_pandas(test_data):
 pd_data = test_data.pd_data.copy()
 ds = ChartDataSource.from_data(pd_data)
 assert (len(ds.columns) == 2)
 assert (len(ds.index) == 4)
 ds = ChartDataSource(pd_data)
 assert (len(ds.columns) == 2)
 assert (len(ds.index) == 4)
 assert pd_data.equals(test_data.pd_data)

def test_pandas ( test_data ) : pd_data = test_data . pd_data . copy ( ) ds = ChartDataSource . from_data ( pd_data ) assert ( len ( ds . columns ) == 2 ) assert ( len ( ds . index ) == 4 ) ds = ChartDataSource ( pd_data ) assert ( len ( ds . columns ) == 2 ) assert ( len ( ds . index ) == 4 ) assert pd_data . equals ( test_data . pd_data )
test creating chart data source from existing dataframe .