Skip to content

crandas.random

randbytes(n, *, num_rows)

Generate secret random bytes.

PARAMETER DESCRIPTION
n

Length of the generated values in bytes.

TYPE: MaybePlaceholder[NonNegativeInt]

num_rows

Number of rows in the output

TYPE: MaybePlaceholder[NonNegativeInt]

RETURNS DESCRIPTION
Series

Series filled with secret random bytes.

randint(a, b, *, num_rows)

Generate secret random integer values in \([a, b]\), including both endpoints.

PARAMETER DESCRIPTION
a

Lower bound of the possible outputs, inclusive.

TYPE: MaybePlaceholder[int]

b

Upper bound of the possible outputs, inclusive.

TYPE: MaybePlaceholder[int]

num_rows

Number of rows in the output

TYPE: MaybePlaceholder[NonNegativeInt]

RETURNS DESCRIPTION
Series

Series filled with secret random integers.

random(*, num_rows, precision=20)

Generate secret random fixed-point values in \([0, 1)\).

PARAMETER DESCRIPTION
num_rows

Number of rows in the output.

TYPE: int

precision

Precision of the generated fixed-point values.

TYPE: int DEFAULT: 20

RETURNS DESCRIPTION
Series

Series filled with secret random fixed-points.