Bulk Update

DataSample.update_to_insight_maker(im , columns, mask=None, value=None)

A function of a DataSample object (returned from searches) to update all documents returned from that search.

Parameters:

Name
Type
Description

im

InsightMaker

InsightMaker object associated with instance to perform update on

columns

List or String

single column to update or list of column names

mask

Iterable

Optional – A filter for a Pandas DataFrame to select rows to update

value

Any

Optional – Update supplied column(s) to this value, rather than the ones in DataSample.df

Response:

True

Example:

# Search a result set
results = im.search("Hello World", dataset = "documents")

# Update results set with a value
results.update_to_insight_maker(im, "metadata.title", value="Test Python")