split.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/scalar/scalar.hpp>
9 #include <cudf/table/table.hpp>
11 
17 namespace CUDF_EXPORT cudf {
18 namespace strings {
47 std::unique_ptr<table> split(
48  strings_column_view const& strings_column,
49  string_scalar const& delimiter = string_scalar(""),
50  size_type maxsplit = -1,
53 
77 std::unique_ptr<table> rsplit(
78  strings_column_view const& strings_column,
79  string_scalar const& delimiter = string_scalar(""),
80  size_type maxsplit = -1,
83 
151 std::unique_ptr<column> split_record(
152  strings_column_view const& strings,
153  string_scalar const& delimiter = string_scalar(""),
154  size_type maxsplit = -1,
157 
230 std::unique_ptr<column> rsplit_record(
231  strings_column_view const& strings,
232  string_scalar const& delimiter = string_scalar(""),
233  size_type maxsplit = -1,
236 
253 std::unique_ptr<column> split_part(
254  strings_column_view const& input,
255  string_scalar const& delimiter = string_scalar(""),
256  size_type index = 0,
259  // end of doxygen group
261 } // namespace strings
262 } // namespace CUDF_EXPORT cudf
An owning class to represent a string in device memory.
Definition: scalar.hpp:411
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
std::unique_ptr< column > split_part(strings_column_view const &input, string_scalar const &delimiter=string_scalar(""), size_type index=0, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a columns of strings by splitting each input string using the specified delimiter and returni...
std::unique_ptr< table > rsplit(strings_column_view const &strings_column, string_scalar const &delimiter=string_scalar(""), size_type maxsplit=-1, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a list of columns by splitting each string using the specified delimiter starting from the en...
std::unique_ptr< column > split_record(strings_column_view const &strings, string_scalar const &delimiter=string_scalar(""), size_type maxsplit=-1, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Splits individual strings elements into a list of strings.
std::unique_ptr< table > split(strings_column_view const &strings_column, string_scalar const &delimiter=string_scalar(""), size_type maxsplit=-1, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns a list of columns by splitting each string using the specified delimiter.
std::unique_ptr< column > rsplit_record(strings_column_view const &strings, string_scalar const &delimiter=string_scalar(""), size_type maxsplit=-1, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Splits individual strings elements into a list of strings starting from the end of each string.
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for cudf::scalar.
Class definition for cudf::strings_column_view.
Class definition for cudf::table.