add_data
add_data(df)Ingests raw simulation data, filtering for relevant columns only.
This method automatically strips away any columns in df that were not defined in self.inputs or self.outcome during initialization.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| df | pd.DataFrame | The DataFrame to ingest. | required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If the new data is missing any required input or outcome columns. |
Examples
import pandas as pd
df = pd.DataFrame({
'Length': [1.0, 2.5, 5.0],
'Angle': [0, 15, -10],
'Signal': [0.5, 0.8, 1.2]
})
study.add_data(df)