Data is available to the Python Script component from a Python Pandas
DataFrame named plp_df. This DataFrame contains each Pipeline Creator data records’ properties as columns.
After your Python code executes, the component converts data in the Pandas DataFrame
plp_df to Pipeline Creator data records that are passed to the next component. You do not need to retain information
in plp_df. You can edit or delete plp_df in your script if
you declare a new plp_df DataFrame before the end.
Data Types
The following table describes how the Python Script component converts
Pipeline Creator data types to Python data types in the Pandas DataFrame.
| Pipeline Creator |
Pandas DataFrame |
| String |
Object |
| Double |
Float64 |
| Integer |
Int64 |
| Boolean |
Bool |
| DateTime |
Datetime64 |
| Other (Hierarchical Data, etc.) |
Not Supported |
You can cast data types in the code or in the pipeline:
- Include Python code to cast the data types in
plp_df:plp_df['Column Name'] = plp_df['Column Name'].astype('pandas datatype')For
more information about converting datatypes, see:
- Specify the data types in the pipeline before the Python Script
component and allow the component to cast the data types as described in the table.
Supported Python Dictionaries
You can use the following Python dictionaries in your Python script:
plp_globals: Contains the Pipeline Creator global properties.
plp_params: Contains the values of the component parameters.
You cannot change the values in plp_globals or plp_params
from the Python Script component.
Installed Python Libraries
The following common data science libraries are automatically available in the
Python Script component.
- Matplotlib
- NumPy
- Pandas
- Pytorch
- Scikit-Learn
- Scikit-Optimize
- SciPy
- torchcfm
- torchvision
- xgboost
For additional information about how to use the component, refer to the Python
Script component help.