Python Script Component Overview

Some Pipeline Creator templates include a Python Script component that allows you to write and execute Python code on a Pandas DataFrame.

This page discusses:

See Also
Python Reference
Important: The supported versions of Python and its libraries may be updated in new versions of Pipeline Creator. This may cause scripts written in older versions of Pipeline Creator to stop working. If your scripts no longer run after an upgrade, review them to make sure they are compatible with the new libraries. For information about updated versions of Python and its libraries, see What's New.

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:

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
Note: For version information, see What's New.

For additional information about how to use the component, refer to the Python Script component help.