Skip to content

Instantly share code, notes, and snippets.

View brandon-b-miller's full-sized avatar

brandon-b-miller

  • NVIDIA
  • Chicago
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import cudf
sr = cudf.Series([1,2,3])
val = 1
print(sr + val)
sr1 = cudf.Series([1,2,3])
sr2 = cudf.Series([2,3,4])
val = 1
result_1 = sr1 + val
result_2 = sr2 – val
import cudf
sr1 = cudf.Series([1,2,3])
sr2 = cudf.Series([2,3,4])
val = cudf.Scalar(1) # construct a cuDF scalar
result_1 = sr1 + val
result_2 = sr2 – val
import cudf
val = cudf.Scalar(1)
print(val)
import cudf
val = cudf.Scalar(12, dtype="int8")
print(val)
str_val = cudf.Scalar("hello", dtype="str")
print(str_val)
datetime_val = cudf.Scalar("2011-01-01", dtype="datetime64[ns]")
print(datetime_val)
import cudf
# a valid op
x = cudf.Scalar('2011-01-01', dtype='datetime64[ns]')
y = cudf.Scalar(100, dtype='timedelta64[ms]')
print(x + y)