def test_dataframes(stream): df = pd.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]}) sdf = DataFrames(example=df, stream=stream) L = (sdf + 1).x.sum().stream.gather().sink_to_list() sdf.emit(df) sdf.emit(df) assert L == [9, 9]
def test_dataframes(stream): df = cudf.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]}) sdf = DataFrames(example=df, stream=stream) L = sdf.x.sum().stream.gather().sink_to_list() sdf.emit(df) sdf.emit(df) assert L == [6, 6]
def df2sdf_converter(df): sdf = DataFrames(stream=st, example=df) # stream , example, stream_type logging.info('conversion process now') show_spec_px = sdf[sdf.item == 'bond'].price.sum() print(show_spec_px)