Execute custom Python code with access to data analysis libraries. Perfect for custom calculations, data transformations, and advanced processing.
Field | Type | Required | Description |
---|---|---|---|
Variables | Variables | No | Dynamic data from other nodes injected into your code context |
Code | Code | Yes | The Python code to execute (result must be on the last line) |
Output | Description |
---|---|
Data | The results value returned by your code execution |
Library | Version | Use Case |
---|---|---|
aiohttp | v3.9.3 | Asynchronous HTTP client/server |
beautifulsoup4 | v4.12.3 | Web scraping and HTML/XML parsing |
bokeh | v3.3.4 | Interactive visualization |
gensim | v4.3.2 | Topic modeling and document analysis |
imageio | v2.34.0 | Image I/O operations |
joblib | v1.3.2 | Parallel computing and model persistence |
librosa | v0.10.1 | Audio analysis and music information retrieval |
matplotlib | v3.8.3 | Data visualization and plotting |
nltk | v3.8.1 | Natural language processing |
numpy | v1.26.4 | Numerical computing and arrays |
opencv-python | v4.9.0.80 | Computer vision and image processing |
openpyxl | v3.1.2 | Excel file reading and writing |
pandas | v1.5.3 | Data manipulation and analysis |
plotly | v5.19.0 | Interactive web-based visualizations |
pytest | v8.1.0 | Testing framework |
python-docx | v1.1.0 | Microsoft Word document manipulation |
pytz | v2024.1 | Timezone handling |
requests | v2.26.0 | HTTP requests and API calls |
scikit-image | v0.22.0 | Image processing algorithms |
scikit-learn | v1.4.1.post1 | Machine learning library |
scipy | v1.12.0 | Scientific computing |
seaborn | v0.13.2 | Statistical data visualization |
soundfile | v0.12.1 | Audio file I/O |
spacy | v3.7.4 | Advanced natural language processing |
sympy | v1.12 | Symbolic mathematics |
textblob | v0.18.0 | Simple text processing |
tornado | v6.4 | Web framework and networking |
urllib3 | v1.26.7 | HTTP client library |
xarray | v2024.2.0 | Multi-dimensional arrays and datasets |
xlrd | v2.0.1 | Excel file reading |
return
statementsprint()
statements for output - use the last line insteaddf.to_dict('records')
).tolist()
)What happens if my code has an error?
Can I import additional libraries?
How do I return multiple values?
{"value1": result1, "value2": result2}
. You can also return a list of dictionaries for multiple records.Why can't I return a pandas DataFrame directly?
df.to_dict('records')
for row-based data or df.to_dict()
for column-based data.How do I debug my code?
{"debug": variable_name}
to see what data you’re working with.Can I make HTTP requests in my code?
requests
library to make API calls: import requests; response = requests.get('https://api.example.com')
.What if I need to process very large datasets?
Can I save files or write to disk?