You can insert a dataframe easily with Relevance AI.
- Format: the file passed to the
insert_csvfunction must be a valid Pandas dataframe
- Fields: the dataframe can include as many columns as needed
- Vector fields: the name of vector fields must end in
- Id field: Relevance AI platform identifies unique data entries within a dataset using a field called
_id(i.e. every document in the dataset must include an
_idfield with a unique value per document). There are some arguments to help you take care of this field when using
- If the dataset includes a unique identifier per document but the name of the field is not
_id, simply pass the name under
col_for_id. For instance, in the example below, the field
REF-Nocontains the unique identifier that can be passed as
First, the Relevance AI SDK package must be installed.
# remove `!` if running the line in a terminal !pip install -U RelevanceAI[notebook]==2.0.0
from relevanceai import Client """ You can sign up/login and find your credentials here: https://cloud.relevance.ai/sdk/api Once you have signed up, click on the value under `Activation token` and paste it here """ client = Client()
ds = client.Dataset('quickstart_insert_df') ds.insert_df(df)
Updated about 1 month ago
Did this page help you?