flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
17
BACK_BACK/OBSEI/observer.py
Executable file
17
BACK_BACK/OBSEI/observer.py
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
import pandas as pd
|
||||
from obsei.source.pandas_source import PandasSource, PandasSourceConfig
|
||||
|
||||
# Initialize your Pandas DataFrame from your sources like csv, excel, sql etc
|
||||
# In following example we are reading csv which have two columns title and text
|
||||
csv_file = "https://raw.githubusercontent.com/deepset-ai/haystack/master/tutorials/small_generator_dataset.csv"
|
||||
dataframe = pd.read_csv(csv_file)
|
||||
|
||||
# initialize pandas sink config
|
||||
sink_config = PandasSourceConfig(
|
||||
dataframe=dataframe,
|
||||
include_columns=["score"],
|
||||
text_columns=["name", "degree"],
|
||||
)
|
||||
|
||||
# initialize pandas sink
|
||||
sink = PandasSource()
|
||||
Loading…
Add table
Add a link
Reference in a new issue