pub trait BinaryNameSpaceImpl: AsBinary {
Show 16 methods
// Provided methods
fn bin_slice(
&self,
offset: &Column,
length: &Column,
) -> Result<ChunkedArray<BinaryType>, PolarsError> { ... }
fn bin_head(
&self,
n: &Column,
) -> Result<ChunkedArray<BinaryType>, PolarsError> { ... }
fn bin_tail(
&self,
n: &Column,
) -> Result<ChunkedArray<BinaryType>, PolarsError> { ... }
fn contains(&self, lit: &[u8]) -> ChunkedArray<BooleanType> { ... }
fn contains_chunked(
&self,
lit: &ChunkedArray<BinaryType>,
) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn ends_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType> { ... }
fn starts_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType> { ... }
fn starts_with_chunked(
&self,
prefix: &ChunkedArray<BinaryType>,
) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn ends_with_chunked(
&self,
suffix: &ChunkedArray<BinaryType>,
) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn size_bytes(&self) -> ChunkedArray<UInt32Type> { ... }
fn hex_decode(
&self,
strict: bool,
) -> Result<ChunkedArray<BinaryType>, PolarsError> { ... }
fn hex_encode(&self) -> Series { ... }
fn base64_decode(
&self,
strict: bool,
) -> Result<ChunkedArray<BinaryType>, PolarsError> { ... }
fn base64_encode(&self) -> Series { ... }
fn reinterpret(
&self,
dtype: &DataType,
is_little_endian: bool,
) -> Result<Series, PolarsError> { ... }
fn _reinterpret_inner(
&self,
dtype: &DataType,
is_little_endian: bool,
) -> Result<Vec<Box<dyn Array>>, PolarsError> { ... }
}Available on crate feature
polars-ops only.Provided Methods§
Sourcefn bin_slice(
&self,
offset: &Column,
length: &Column,
) -> Result<ChunkedArray<BinaryType>, PolarsError>
fn bin_slice( &self, offset: &Column, length: &Column, ) -> Result<ChunkedArray<BinaryType>, PolarsError>
Slice the binary values.
Determines a slice starting from offset and with length length of each of the elements.
offset can be negative, in which case the start counts from the end of the bytes.
Sourcefn bin_head(&self, n: &Column) -> Result<ChunkedArray<BinaryType>, PolarsError>
fn bin_head(&self, n: &Column) -> Result<ChunkedArray<BinaryType>, PolarsError>
Slice the first n bytes of the binary value.
Determines a slice starting at the beginning of the binary data up to offset n of each
element. n can be negative, in which case the slice ends n bytes from the end.
Sourcefn bin_tail(&self, n: &Column) -> Result<ChunkedArray<BinaryType>, PolarsError>
fn bin_tail(&self, n: &Column) -> Result<ChunkedArray<BinaryType>, PolarsError>
Slice the last n bytes of the binary value.
Determines a slice starting at offset n of each element. n can be
negative, in which case the slice begins n bytes from the start.
Sourcefn contains(&self, lit: &[u8]) -> ChunkedArray<BooleanType>
fn contains(&self, lit: &[u8]) -> ChunkedArray<BooleanType>
Check if binary contains given literal
fn contains_chunked( &self, lit: &ChunkedArray<BinaryType>, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
Sourcefn ends_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType>
fn ends_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType>
Check if strings ends with a substring
Sourcefn starts_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType>
fn starts_with(&self, sub: &[u8]) -> ChunkedArray<BooleanType>
Check if strings starts with a substring
fn starts_with_chunked( &self, prefix: &ChunkedArray<BinaryType>, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn ends_with_chunked( &self, suffix: &ChunkedArray<BinaryType>, ) -> Result<ChunkedArray<BooleanType>, PolarsError>
Sourcefn size_bytes(&self) -> ChunkedArray<UInt32Type>
fn size_bytes(&self) -> ChunkedArray<UInt32Type>
Get the size of the binary values in bytes.