read:
- train.classify:
model_id: xxxxxxxx-xxxx-xxxx
Example |
Category |
Notes |
Apple |
Fruit |
|
Broccoli |
Vegetable |
|
Pear |
Fruit |
|
Aperagus |
Vegetable |
|
Parameter |
Required |
Data Type |
Notes |
model_id |
✓ |
str |
Model id of wrangle to be read from |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
from wrangles.connectors import train
df = train.classify.read(model_id = 'xxxxxxxx-xxxx-xxxx')
Example |
Category |
Notes |
Apple |
Fruit |
|
Broccoli |
Vegetable |
|
Pear |
Fruit |
|
Asperagus |
Vegetable |
|
Parameter |
Required |
Data Type |
Notes |
model_id |
✓ |
str |
Model id of wrangle to be read from |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Update the training data for an existing classify wrangle.
write:
- train.classify:
columns:
- Example
- Category
- Notes
model_id: xxxxxxxx-xxxx-xxxx
Parameter |
Required |
Data Type |
Notes |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Create a new classify wrangle.
from wrangles.connectors import train
import pandas as pd
df = pd.DataFrame({
'Example': ['Apple', 'Broccoli', 'Pear', 'Asperagus'],
'Category': ['Fruit', 'Vegitable', 'Fruit', 'Vegitable'],
'Notes': ['', '', '', '']
})
train.classify.write(df = df, name = 'Fruits and Veggies')
Parameter |
Required |
Data Type |
Notes |
df |
✓ |
Pandas DataFrame |
Dataframe consisting of training data to be used |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Note both name and model_id cannot be used together. Name is used when creating models and model_id is used when updating an existing model.
read:
- train.extract:
model_id: xxxxxxxx-xxxx-xxxx
Entity to Find |
Variation (Optional) |
Notes |
Ball Bearing |
bearing, ball |
|
Needle Bearing |
needle, bearing |
|
Roller Bearing |
roller, bearing |
|
from wrangles.connectors import train
df = train.extract.read(model_id = 'xxxxxxxx-xxxx-xxxx')
Entity to Find |
Variation (Optional) |
Notes |
Ball Bearing |
bearing, ball |
|
Needle Bearing |
needle, bearing |
|
Roller Bearing |
roller, bearing |
|
Update the training data for an existing extract wrangle.
write:
- train.extract:
columns:
- Entity to Find
- Variation (Optional)
- Notes
model_id: xxxxxxxx-xxxx-xxxx
Parameter |
Required |
Data Type |
Notes |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Create a new classify wrangle.
from wrangles.connectors import train
import pandas as pd
df = pd.DataFrame({
'Entity to Find': ['Ball Bearing', 'Needle Bearing', 'Roller Bearing'],
'Variation': ['bearing, ball', 'needle, bearing', 'roller, bearing'],
'Notes': ['', '', '', '']
})
train.extract.write(df = df, name = 'Bearing Types')
Parameter |
Required |
Data Type |
Notes |
df |
✓ |
Pandas DataFrame |
Dataframe consisting of training data to be used |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Note both name and model_id cannot be used together. Name is used when creating models and model_id is used when updating an existing model.
read:
- train.lookup:
model_id: xxxxxxxx-xxxx-xxxx
Key |
Value1 |
Value2 |
Pizza |
Thin Crust |
Deep Dish |
Hamburger |
Single |
Double |
Salad |
Garden |
Ceasar |
Taco |
Soft |
Crispy |
from wrangles.connectors import train
df = train.lookup.read(model_id = 'xxxxxxxx-xxxx-xxxx')
Key |
Value1 |
Value2 |
Pizza |
Thin Crust |
Deep Dish |
Hamburger |
Single |
Double |
Salad |
Garden |
Ceasar |
Taco |
Soft |
Crispy |
Update the training data for an existing lookup wrangle.
write:
- train.lookup:
model_id: xxxxxxxx-xxxx-xxxx
Parameter |
Required |
Data Type |
Notes |
settings |
|
dict |
Specific settings to apply to the wrangle. Settings include variant which can be key or embedding. Settings must be used when creating a new lookup. |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
columns |
|
str, list |
The columns you wish to write to the Wrangle. Note: Columns must include one column named Key which will be used for the value to be looked up. |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Create a new lookup wrangle.
from wrangles.connectors import train
import pandas as pd
df = pd.DataFrame({
'Key': ['Pizza', 'Hamburger', 'Salad', 'Taco'],
'Value1': ['Thin Crust', 'Single', 'Garden', 'Soft'],
'Value2': ['Deep Dish', 'Double', 'Ceasar', 'Crispy']
})
train.lookup.write(df = df, name = 'Menu Updates', settings = {'variant': 'key'})
Parameter |
Required |
Data Type |
Notes |
df |
✓ |
Pandas DataFrame |
Dataframe consisting of training data to be used |
settings |
|
dict |
Specific settings to apply to the wrangle. Settings include variant which can be key or embedding. Settings must be used when creating a new lookup. |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Note both name and model_id cannot be used together. Name is used when creating models and model_id is used when updating an existing model.
read:
- train.standardize:
model_id: xxxxxxxx-xxxx-xxxx
Find |
Replace |
Notes |
Pizza |
Hamburger |
|
Beef |
Chicken |
|
Bagel |
Donut |
|
Taco |
Burrito |
|
from wrangles.connectors import train
df = train.standardize.read(model_id = 'xxxxxxxx-xxxx-xxxx')
Find |
Replace |
Notes |
Pizza |
Hamburger |
|
Beef |
Chicken |
|
Bagel |
Donut |
|
Taco |
Burrito |
|
Update the training data for an existing standardize wrangle.
write:
- train.standardize:
columns:
- Find
- Replace
- Notes
model_id: xxxxxxxx-xxxx-xxxx
Parameter |
Required |
Data Type |
Notes |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Create a new standardize wrangle.
from wrangles.connectors import train
import pandas as pd
df = pd.DataFrame({
'Find': ['Pizza', 'Beef', 'Bagel', 'Taco'],
'Replace': ['Hamburger', 'Chicken', 'Donut', 'Burrito'],
'Notes': ['', '', '', '']
})
train.standardize.write(df = df, name = 'Menu Updates')
Parameter |
Required |
Data Type |
Notes |
df |
✓ |
Pandas DataFrame |
Dataframe consisting of training data to be used |
columns |
|
list |
List of columns to use for update/wrangle creation, defaults to none |
model_id |
|
str |
Model id of wrangle to update. Only use for existing wrangles, defaults to none |
name |
|
str |
Name of wrangle that is being created, defaults to none |
if |
|
str |
A condition that will determine whether the action runs or not as a whole. |
Note both name and model_id cannot be used together. Name is used when creating models and model_id is used when updating an existing model.