split.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
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 
12 namespace CUDF_EXPORT cudf {
13 namespace strings {
43 std::unique_ptr<table> split(
44  strings_column_view const& strings_column,
45  string_scalar const& delimiter = string_scalar(""),
46  size_type maxsplit = -1,
49 
73 std::unique_ptr<table> rsplit(
74  strings_column_view const& strings_column,
75  string_scalar const& delimiter = string_scalar(""),
76  size_type maxsplit = -1,
79 
147 std::unique_ptr<column> split_record(
148  strings_column_view const& strings,
149  string_scalar const& delimiter = string_scalar(""),
150  size_type maxsplit = -1,
153 
226 std::unique_ptr<column> rsplit_record(
227  strings_column_view const& strings,
228  string_scalar const& delimiter = string_scalar(""),
229  size_type maxsplit = -1,
232 
249 std::unique_ptr<column> split_part(
250  strings_column_view const& input,
251  string_scalar const& delimiter = string_scalar(""),
252  size_type index = 0,
255  // end of doxygen group
257 } // namespace strings
258 } // namespace CUDF_EXPORT cudf
An owning class to represent a string in device memory.
Definition: scalar.hpp:410
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.
detail::cccl_async_resource_ref< 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
cuDF interfaces
Definition: host_udf.hpp:26
Class definitions for cudf::scalar.
Class definition for cudf::strings_column_view.
Class definition for cudf::table.