Bit Byte Manipulation Functions | DataFrame Column | Teradata Package for Python - Bit Byte Manipulation Functions - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

teradataml DataFrameColumn supports following set of bit byte manipulation functions.

See the Bit Byte Manipulation Functions section of Teradata Package for Python Function Reference, B700-4008) at https://docs.teradata.com/ for detailed description and usage examples of these functions.

Bit Byte Manipulation Functions supported by DataFrameColumn
Sr. No. Function Name Description
1 from_byte() Encodes a sequence of bits into a sequence of characters.
2 bit_and() Returns the logical AND operation on the bits from the column and corresponding bits from the argument.
3 bit_get() Returns the bit specified by input argument from the column and returns either 0 or 1 to indicate the value of that bit.
4 bit_or() Returns the logical OR operation on the bits from the column and corresponding bits from the argument.
5 bit_xor() Returns the bitwise XOR operation on the binary representation of the column and corresponding bits from the argument.
6 bitand() It is an alias for bit_and() function.
7 bitnot() Returns a bitwise complement on the binary representation of the column.
8 bitor() It is an alias for bit_or() function.
9 bitwise_not() It is an alias for bitnot() function.
10 bitwiseNOT() It is an alias for bitnot() function.
11 bitxor() It is an alias for bit_xor() function.
12 countset() Returns the count of the binary bits within the column that are either set to 1 or set to 0, depending on the input argument value.
13 getbit() It is an alias for bit_get() function.
14 rotateleft() Returns an expression rotated to the left by the specified number of bits, with the most significant bits wrapping around to the right.
15 rotateright() Returns an expression rotated to the right by the specified number of bits, with the least significant bits wrapping around to the left.
16 setbit() Sets the value of the bit specified by input argument to the value of column.
17 shiftleft() Returns the expression when value in column is shifted by the specified number of bits to the left.
18 shiftright() Returns the expression when column expression is shifted by the specified number of bits to the right.
19 subbitstr() Extracts a bit substring from the column expression based on the specified bit position.
20 to_byte() Converts a numeric data type to the Vantage byte representation (byte value) of the column expression value.