Agent to run Python snippets in a pipenv shell environment.
Input
File or folder
Output
File or folder
Configuration
params
dynamic
[object Object]
env
Pipenv configuration
python_code_param
[[source]]
url = 'https://pypi.python.org/simple'
verify_ssl = true
name = 'pypi'
[requires]
python_version = '3.10'
[packages]
pandas = '==2.2.2'
numpy = '==1.26.4'
code
The code snippet to execute using shell command
python_code_param
# This is a snippet template for a Python agent.
import pandas
# Do the job here ...
data = pandas.read_csv(source_paths[0], header=0, index_col=0, sep=',')
# transform the data
result = data.transpose()
# Write the output file in the target folder
result_path = "result.csv"
result.to_csv(result_path, index=True)
target_paths = [result_path]