-
-
Save brandon-b-miller/59b8ed2fd744d58fc5149bfa0ef4c965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "b5bea737", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0 44\n", | |
"1 45\n", | |
"2 46\n", | |
"dtype: int64\n" | |
] | |
} | |
], | |
"source": [ | |
"import cudf\n", | |
"\n", | |
"sr = cudf.Series([1,2,3])\n", | |
"\n", | |
"def f(x, k):\n", | |
" return x + k + 1\n", | |
"\n", | |
"result = sr.apply(f, args=(42,))\n", | |
"print(result)" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.13" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment