系列#

构造函数#

cudf.Series([data, index, dtype, name, copy, ...])

一维GPU数组(包括时间序列)。

属性#

坐标轴

Series.axes

返回表示Series轴的列表。

Series.index

获取行的标签。

Series.values

返回DataFrame的CuPy表示。

Series.data

数据的GPU缓冲区

Series.dtype

Series的数据类型。

Series.shape

获取一个表示索引维度的元组。

Series.ndim

基础数据的维度数,根据定义为1。

Series.nullable

一个布尔值,指示是否需要空值掩码

Series.nullmask

用于空值掩码的GPU缓冲区

Series.null_count

空值的数量

Series.size

返回基础数据中的元素数量。

Series.T

返回转置,根据定义是自身。

Series.memory_usage([index, deep])

返回对象的内存使用情况。

Series.hasnans

如果有任何NaN或null值,则返回True。

Series.has_nulls

指示Series是否包含空值。

Series.empty

指示DataFrame或Series是否为空。

Series.name

获取此对象的名称。

Series.valid_count

非空值的数量

Series.values_host

返回数据的NumPy表示。

转换#

Series.astype(dtype[, copy, errors])

将对象转换为指定的数据类型。

Series.convert_dtypes([infer_objects, ...])

将列转换为最佳的可空数据类型。

Series.copy([deep])

复制此对象的索引和数据。

Series.deserialize(header, frames)

从序列化表示生成对象。

Series.device_deserialize(header, frames)

执行设备端的反序列化任务。

Series.device_serialize()

序列化与设备内存相关的数据和元数据。

Series.host_deserialize(header, frames)

执行设备端的反序列化任务。

Series.host_serialize()

序列化与主机内存相关的数据和元数据。

Series.serialize()

生成对象的等效可序列化表示。

Series.to_list()

Series.tolist()

Series.__array__([dtype, copy])

Series.scale()

将值缩放到 [0, 1] 的 float64 范围内

索引,迭代#

Series.loc

通过标签或布尔掩码选择行和列。

Series.iloc

按位置选择值。

Series.__iter__()

不支持迭代。

Series.items()

不支持迭代。

Series.iteritems()

不支持迭代。

Series.keys()

返回索引的别名。

Series.squeeze([axis])

将1维轴对象压缩为标量。

二元运算符函数#

Series.add(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素加法(二元操作符add)。

Series.sub(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素减法(二元运算符sub)。

Series.subtract(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素减法(二元操作符sub)。

Series.mul(other[, level, fill_value, axis])

获取DataFrame或Series与其他的逐元素乘法(二元操作符mul)。

Series.multiply(other[, level, fill_value, axis])

获取DataFrame或Series与其他的逐元素乘法(二元操作符mul)。

Series.truediv(other[, level, fill_value, axis])

获取DataFrame或Series与其他的浮点除法,逐元素(二元运算符truediv)。

Series.div(other[, level, fill_value, axis])

获取DataFrame或Series与其他的浮点除法,逐元素(二元运算符truediv)。

Series.divide(other[, level, fill_value, axis])

获取DataFrame或Series与其他的浮点除法,逐元素进行(二元操作符truediv)。

Series.floordiv(other[, level, fill_value, axis])

获取DataFrame或Series与其他的整数除法,逐元素进行(二元运算符floordiv)。

Series.mod(other[, level, fill_value, axis])

获取DataFrame或Series与其他的模,逐元素(二元操作符mod)。

Series.pow(other[, level, fill_value, axis])

获取DataFrame或Series与其他的指数,逐元素(二元操作符pow)。

Series.radd(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的加法,逐元素(二元运算符radd)。

Series.rsub(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素减法(二元运算符rsub)。

Series.rmul(other[, level, fill_value, axis])

获取DataFrame或Series与其他的逐元素乘法(二元运算符rmul)。

Series.rdiv(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的浮点除法,逐元素(二元运算符rtruediv)。

Series.rtruediv(other[, level, fill_value, axis])

获取DataFrame或Series与其他的浮点除法,逐元素(二元运算符rtruediv)。

Series.rfloordiv(other[, level, fill_value, ...])

获取DataFrame或Series与其他元素的整数除法,逐元素进行(二元运算符rfloordiv)。

Series.rmod(other[, level, fill_value, axis])

获取DataFrame或Series与其他的逐元素取模(二元操作符rmod)。

Series.rpow(other[, level, fill_value, axis])

获取DataFrame或Series与其他的指数,逐元素(二元运算符rpow)。

Series.round([decimals, how])

四舍五入到指定的小数位数。

Series.lt(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素小于比较(二元操作符lt)。

Series.gt(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素大于比较(二元操作符gt)。

Series.le(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素小于或等于(二元运算符le)。

Series.ge(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素大于或等于(二元运算符ge)。

Series.ne(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素不等比较(二元运算符ne)。

Series.eq(other[, level, fill_value, axis])

获取DataFrame或Series与其他元素的逐元素相等(二元操作符eq)。

Series.product([axis, skipna, dtype, ...])

返回DataFrame中值的乘积。

Series.dot(other[, reflect])

获取框架与其他的点积,(二元操作符 dot)。

函数应用、分组及窗口#

Series.apply(func[, convert_dtype, args, by_row])

将标量函数应用于Series的值。

Series.map(arg[, na_action])

根据输入对应关系映射Series的值。

Series.groupby([by, axis, level, as_index, ...])

使用映射器或通过一系列列进行分组。

Series.rolling(window[, min_periods, ...])

滚动窗口计算。

Series.pipe(func, *args, **kwargs)

应用 func(self, *args, **kwargs)

计算 / 描述性统计#

Series.abs()

返回一个包含每个元素绝对值的Series/DataFrame。

Series.all([axis, bool_only, skipna])

返回DataFrame中所有元素是否为True。

Series.any([axis, bool_only, skipna])

返回DataFrame中是否有任何元素为True。

Series.autocorr([lag])

计算滞后N的自相关。

Series.between(left, right[, inclusive])

返回布尔系列,相当于 left <= series <= right。

Series.clip([lower, upper, axis, inplace])

在输入阈值处修剪值。

Series.corr(other[, method, min_periods])

计算两个Series之间的样本相关性,排除缺失值。

Series.count()

返回Series中非NA/非空观测值的数量

Series.cov(other[, min_periods, ddof])

计算与Series的协方差,排除缺失值。

Series.cummax([axis, skipna])

返回Series的累积最大值。

Series.cummin([axis, skipna])

返回Series的累积最小值。

Series.cumprod([axis, skipna])

返回Series的累积乘积。

Series.cumsum([axis, skipna])

返回Series的累积和。

Series.describe([percentiles, include, exclude])

生成描述性统计信息。

Series.diff([periods])

元素的第一个离散差异。

Series.digitize(bins[, right])

返回每个值所属的区间的索引。

Series.ewm([com, span, halflife, alpha, ...])

提供指数加权(EW)函数。

Series.factorize([sort, use_na_sentinel])

将输入值编码为整数标签。

Series.kurt([axis, skipna, numeric_only])

返回样本的Fisher无偏峰度。

Series.max([axis, skipna, numeric_only])

返回DataFrame中的最大值。

Series.mean([axis, skipna, numeric_only])

返回请求轴上的值的平均值。

Series.median([axis, skipna, numeric_only])

返回请求轴的值的中位数。

Series.min([axis, skipna, numeric_only])

返回DataFrame中的最小值。

Series.mode([dropna])

返回数据集的众数。

Series.nlargest([n, keep])

返回一个新的包含n个最大元素的Series。

Series.nsmallest([n, keep])

返回一个新的Series,包含n个最小的元素。

Series.pct_change([periods, fill_method, ...])

计算Series中连续元素之间的百分比变化。

Series.prod([axis, skipna, dtype, ...])

返回DataFrame中值的乘积。

Series.quantile([q, interpolation, exact, ...])

返回给定分位数的值。

Series.rank([axis, method, numeric_only, ...])

沿轴计算数值数据的排名(1到n)。

Series.skew([axis, skipna, numeric_only])

返回样本的无偏Fisher-Pearson偏度。

Series.std([axis, skipna, ddof, numeric_only])

返回DataFrame的样本标准差。

Series.sum([axis, skipna, dtype, ...])

返回DataFrame中值的总和。

Series.var([axis, skipna, ddof, numeric_only])

返回DataFrame的无偏方差。

Series.kurtosis([axis, skipna, numeric_only])

返回样本的Fisher无偏峰度。

Series.unique()

返回此Series的唯一值。

Series.nunique([dropna])

返回列中唯一值的计数。

Series.is_unique

如果对象中的值是唯一的,则返回布尔值。

Series.is_monotonic_increasing

如果对象中的值单调递增,则返回布尔值。

Series.is_monotonic_decreasing

如果对象中的值单调递减,则返回布尔值。

Series.value_counts([normalize, sort, ...])

返回一个包含唯一值计数的Series。

重新索引 / 选择 / 标签操作#

Series.add_prefix(prefix[, axis])

使用字符串 prefix 作为前缀标签。

Series.add_suffix(suffix[, axis])

使用字符串suffix作为后缀标签。

Series.drop([labels, axis, index, columns, ...])

从行或列中删除指定的标签。

Series.drop_duplicates([keep, inplace, ...])

返回删除重复值的Series。

Series.duplicated([keep])

指示重复的Series值。

Series.equals(other)

测试两个对象是否包含相同的元素。

Series.first(offset)

根据日期偏移选择时间序列数据的初始周期。

Series.head([n])

返回前 n 行。

Series.isin(values)

检查值是否包含在Series中。

Series.last(offset)

根据日期偏移量选择时间序列数据的最后几个周期。

Series.reindex([index, axis, method, copy, ...])

使Series适应新的索引。

Series.rename([index, axis, copy, inplace, ...])

更改系列名称

Series.reset_index([level, drop, name, ...])

重置Series的索引,或其一个级别。

Series.sample([n, frac, replace, weights, ...])

从对象的轴返回随机样本项。

Series.take(indices[, axis])

返回一个包含由indices指定的行的新框架。

Series.tail([n])

返回最后n行作为新的DataFrame或Series

Series.tile(count)

将行重复 count 次以形成一个新的 Frame。

Series.truncate([before, after, axis, copy])

在某个索引值前后截断Series或DataFrame。

Series.where(cond[, other, inplace, axis, level])

替换条件为False的值。

Series.mask(cond[, other, inplace, axis, level])

替换条件为True的值。

缺失数据处理#

Series.backfill([value, axis, inplace, limit])

Series.fillna() 的同义词,使用 method='bfill'

Series.bfill([value, axis, inplace, limit, ...])

Series.fillna() 的同义词,使用 method='bfill'

Series.dropna([axis, inplace, how, ignore_index])

返回一个删除了空值的Series。

Series.ffill([value, axis, inplace, limit, ...])

Series.fillna() 的同义词,使用 method='ffill'

Series.fillna([value, method, axis, ...])

使用value或指定的method填充空值。

Series.interpolate([method, axis, limit, ...])

在某些点之间插值数据。

Series.isna()

识别缺失值。

Series.isnull()

识别缺失值。

Series.nans_to_nulls()

将nans(如果有)转换为nulls

Series.notna()

识别非缺失值。

Series.notnull()

识别非缺失值。

Series.pad([value, axis, inplace, limit])

Series.fillna() 的同义词,使用 method='ffill'

Series.replace([to_replace, value, inplace, ...])

to_replace中给定的值替换为value

重塑、排序#

Series.argsort([axis, kind, order, ...])

返回将Series值排序的整数索引。

Series.sort_values([axis, ascending, ...])

沿任一轴按值排序。

Series.sort_index([axis, level, ascending, ...])

按标签排序对象(沿轴)。

Series.explode([ignore_index])

将类似列表的每个元素转换为一行,复制索引值。

Series.searchsorted(values[, side, sorter, ...])

查找应插入元素以保持顺序的索引

Series.repeat(repeats[, axis])

连续重复元素。

Series.transpose()

返回转置,根据定义是自身。

组合 / 比较 / 连接 / 合并#

Series.update(other)

使用传入的Series的值就地修改Series。

访问器#

pandas 在各种访问器下提供了特定于数据类型的方法。 这些是 Series 中的独立命名空间,仅适用于特定的数据类型。

数据类型

访问器

日期时间,时间差

dt

字符串

str

分类

cat

列表

list

结构体

struct

日期时间属性#

Series.dt 可用于访问系列的值作为类似日期时间的对象,并返回多个属性。 这些属性可以通过 Series.dt. 的方式访问。

Series.dt

用于访问Series值的日期时间属性的访问器对象。

日期时间属性#

year

日期时间的年份。

month

月份,1月=1,12月=12。

day

日期时间的天数。

hour

日期时间的小时部分。

minute

日期时间中的分钟部分。

second

日期时间的秒数。

microsecond

日期时间的微秒部分。

nanosecond

日期时间的纳秒部分。

dayofweek

一周中的第几天,周一=0,周日=6。

weekday

一周中的某一天,周一=0,周日=6。

dayofyear

一年中的第几天,非闰年为1-365,闰年为1-366。

day_of_year

一年中的第几天,非闰年为1-365,闰年为1-366。

quarter

表示日期属于一年中的哪个季度的整数指示符。

is_month_start

布尔值,指示日期是否为月份的第一天。

is_month_end

布尔指示符,表示日期是否为该月的最后一天。

is_quarter_start

布尔指示符,表示日期是否为季度的第一天。

is_quarter_end

布尔指示符,表示日期是否为季度的最后一天。

is_year_start

布尔指示符,表示日期是否为一年中的第一天。

is_year_end

布尔指示符,表示日期是否为一年中的最后一天。

is_leap_year

布尔指示符,表示日期是否属于闰年。

days_in_month

获取日期所在月份的总天数。

日期时间方法#

isocalendar()

返回一个DataFrame,其中包含根据ISO 8601标准计算的年、周和日。

strftime(date_format, *args, **kwargs)

使用指定的 date_format 转换为 Series。

round(freq)

对数据执行四舍五入操作到指定的频率。

floor(freq)

对数据执行向下取整操作到指定的频率。

ceil(freq)

对数据执行向上取整操作到指定的频率。

tz_localize(tz[, ambiguous, nonexistent])

将无时区数据本地化为有时区数据。

时间差属性#

days

天数。

seconds

秒数(大于等于0且小于1天)。

microseconds

微秒数(大于等于0且小于1秒)。

nanoseconds

返回纳秒数(n),其中 0 <= n < 1 微秒。

components

返回一个包含Timedeltas组件的数据框。

字符串处理#

Series.str 可以用来访问系列的值作为字符串并对其应用多种方法。这些方法可以通过 Series.str.<函数/属性> 来访问。

Series.str

用于Series和Index的向量化字符串函数。

byte_count()

计算Series/Index中每个字符串的字节数。

capitalize()

将Series/Index中的字符串转换为首字母大写。

cat()

将Series/Index中的字符串与给定的分隔符连接起来。

center(width[, fillchar])

使用额外字符填充Series/Index中字符串的左右两侧。

character_ngrams([n, as_list])

从字符串列中的字符生成n-grams。

character_tokenize()

每个字符串被分割成单个字符。

code_points()

返回一个数组,该数组填充了每个字符串中每个字符的UTF-8代码点值。

contains(pat[, case, flags, na, regex])

测试模式或正则表达式是否包含在Series或Index的字符串中。

count(pat[, flags])

计算Series/Index中每个字符串中模式的出现次数。

detokenize(indices[, separator])

通过按照它们在indices列中出现的顺序连接它们,将标记组合成字符串。

edit_distance(targets)

使用Levenshtein编辑距离算法将targets字符串与此实例中的字符串进行比较。

edit_distance_matrix()

计算系列中字符串之间的编辑距离。

endswith(pat)

测试每个字符串元素的结尾是否匹配一个模式。

extract(pat[, flags, expand])

将正则表达式 pat 中的捕获组提取为 DataFrame 中的列。

filter_alphanum([repl, keep])

从此列中的字符串中删除非字母数字字符。

filter_characters(table[, keep, repl])

使用给定映射表中的字符范围从每个字符串中移除字符。

filter_tokens(min_token_length[, ...])

从系列中的每个字符串中移除小于min_token_length的标记,并可选地用替换字符串替换它们。

find(sub[, start, end])

返回Series/Index中每个字符串中子字符串完全包含在[start:end]之间的最低索引。

findall(pat[, flags])

在Series/Index中查找模式或正则表达式的所有出现。

find_multiple(patterns)

在Series/Index中查找所有模式的首个出现位置。

get([i])

从每个组件的指定位置提取元素。

get_json_object(json_path, *[, ...])

将JSONPath字符串应用于输入字符串列,其中列中的每一行都是有效的json字符串

hex_to_int()

返回由每个十六进制字符串表示的整数值。

htoi()

返回由每个十六进制字符串表示的整数值。

index(sub[, start, end])

返回每个字符串中子字符串完全包含在[start:end]之间的最低索引。

insert([start, repl])

将指定的字符串插入到每个字符串的指定位置。

ip2int()

将IP字符串转换为整数

ip_to_int()

将IP字符串转换为整数

is_consonant(position)

如果字符串中position位置的字符是辅音,则返回true。

is_vowel(position)

对于在position位置的字符是元音而不是辅音的字符串,返回true。

isalnum()

检查每个字符串中的所有字符是否都是字母数字。

isalpha()

检查每个字符串中的所有字符是否都是字母。

isdecimal()

检查每个字符串中的所有字符是否都是十进制数字。

isdigit()

检查每个字符串中的所有字符是否都是数字。

isempty()

检查每个字符串是否为空字符串。

isfloat()

检查每个字符串中的所有字符是否形成浮点值。

ishex()

检查每个字符串中的所有字符是否构成一个十六进制整数。

isinteger()

检查每个字符串中的所有字符是否形成整数。

isipv4()

检查每个字符串中的所有字符是否构成一个IPv4地址。

isspace()

检查每个字符串中的所有字符是否都是空白字符。

islower()

检查每个字符串中的所有字符是否都是小写。

isnumeric()

检查每个字符串中的所有字符是否都是数字。

isupper()

检查每个字符串中的所有字符是否都是大写。

istimestamp(format)

检查每个字符串中的所有字符是否可以使用给定的格式转换为时间戳。

istitle()

检查每个字符串是否为标题格式。

jaccard_index(input, width)

计算此列与给定输入字符串列之间的Jaccard指数。

join([sep, string_na_rep, sep_na_rep])

将Series/Index中包含的列表与传递的分隔符连接起来。

len()

计算Series/Index中每个元素的长度。

like(pat[, esc])

测试一个like模式是否匹配Series或Index的字符串。

ljust(width[, fillchar])

在Series/Index的字符串右侧填充一个额外的字符。

lower()

将所有字符转换为小写。

lstrip([to_strip])

移除前导和尾随字符。

match(pat[, case, flags])

确定每个字符串是否匹配正则表达式。

minhash([seeds, width])

计算字符串列的minhash值。

ngrams([n, separator])

从一组标记中生成n-grams,系列中的每条记录被视为一个标记。

ngrams_tokenize([n, delimiter, separator])

使用每个字符串中的标记生成n-grams。

normalize_characters([do_lower])

规范化字符串字符以便进行分词。

normalize_spaces()

移除标记之间的多余空格,并修剪每个字符串开头和结尾的空格。

pad(width[, side, fillchar])

将Series/Index中的字符串填充到指定宽度。

partition([sep, expand])

在第一次出现 sep 的地方分割字符串。

porter_stemmer_measure()

计算每个字符串的Porter Stemmer度量。

repeat(repeats)

复制Series或Index中的每个字符串。

removeprefix(prefix)

从对象系列中移除前缀。

removesuffix(suffix)

从对象系列中移除后缀。

replace(pat, repl[, n, case, flags, regex])

将Series/Index中的模式/正则表达式替换为其他字符串。

replace_tokens(targets, replacements[, ...])

在系列中的每个字符串中搜索目标标记,并在找到时用相应的替换项替换。

replace_with_backrefs(pat, repl)

使用 repl 反向引用模板创建一个新字符串,该字符串包含使用 pat 表达式找到的提取元素。

rfind(sub[, start, end])

返回Series/Index中每个字符串中子字符串完全包含在[start:end]之间的最高索引。

rindex(sub[, start, end])

返回每个字符串中子字符串完全包含在 [start:end] 范围内的最高索引。

rjust(width[, fillchar])

在Series/Index中的字符串左侧填充额外的字符。

rpartition([sep, expand])

在最后一次出现 sep 的地方分割字符串。

rsplit([pat, n, expand, regex])

围绕给定的分隔符/定界符分割字符串。

rstrip([to_strip])

移除前导和尾随字符。

slice([start, stop, step])

从Series或Index中的每个元素中切片子字符串。

slice_from(starts, stops)

返回每个字符串的子字符串,使用每个字符串的位置。

slice_replace([start, stop, repl])

用新字符串替换每个字符串的指定部分。

split([pat, n, expand, regex])

围绕给定的分隔符/定界符分割字符串。

startswith(pat)

测试每个字符串元素的开头是否匹配一个模式。

strip([to_strip])

移除前导和尾随字符。

swapcase()

将每个小写字符转换为大写,反之亦然。

title()

将每个空格后的第一个字母大写,其余字母小写。

token_count([delimiter])

每个字符串使用提供的分隔符分割成令牌。

tokenize([delimiter])

每个字符串使用提供的分隔符分割成令牌。

translate(table)

通过给定的映射表映射字符串中的所有字符。

upper()

将每个字符串转换为大写。

url_decode()

返回每个字符串的URL解码格式。

url_encode()

返回每个字符串的URL编码格式。

wrap(width, **kwargs)

将Series/Index中的长字符串换行,使其在段落中格式化,长度小于给定宽度。

zfill(width)

通过在Series/Index中的字符串前面添加'0'字符来填充字符串。

分类访问器#

分类数据类型特定的方法和属性可通过Series.cat访问器获得。

Series.cat

用于访问Series值的分类属性的访问器对象。

categories

此分类的类别。

ordered

类别是否具有有序关系。

codes

返回代码的Series以及索引。

reorder_categories(new_categories[, ordered])

按照new_categories中指定的顺序重新排列类别。

add_categories(new_categories)

添加新类别。

remove_categories(removals)

移除指定的类别。

set_categories(new_categories[, ordered, rename])

将类别设置为指定的 new_categories。

as_ordered()

将分类设置为有序。

as_unordered()

将分类设置为无序。

列表处理#

Series.list 可以用来访问系列的值作为列表,并对其应用列表方法。这些可以通过 Series.list. 来访问。

Series.list

Series的列表方法

astype(dtype)

返回一个新的列表系列,其中叶值转换为指定的数据类型。

concat([dropna])

对于至少有一层嵌套的列,连接每行中的列表。

contains(search_key)

返回布尔值,指示指定的标量是否是每行的元素。

index(search_key)

返回表示每行搜索键索引的整数。

get(index[, default])

从列表系列中的每个列表中提取给定索引处的元素。

leaves

从一系列(可能是嵌套的)列表中,获取最内层列表的元素,并将其展平为一个Series(每行一个值)。

len()

计算Series/Index中每个元素的长度。

sort_values([ascending, inplace, kind, ...])

按值对每个列表进行排序。

take(lists_indices)

根据给定的索引收集列表元素。

unique()

返回每个列表中的唯一元素。

结构处理#

Series.struct 可以用来访问系列的值作为结构体并对其应用结构体方法。这些可以通过 Series.struct. 来访问。

Series.struct

Series的结构方法

field(key)

提取Series中指定结构列的子列

explode()

返回一个DataFrame,其列是此结构体Series的字段。

序列化 / 输入输出 / 转换#

Series.to_arrow()

转换为PyArrow数组。

Series.to_cupy([dtype, copy, na_value])

将Frame转换为CuPy数组。

Series.to_dict([into])

将Series转换为{标签 -> 值}字典或类似字典的对象。

Series.to_dlpack()

将 cuDF 对象转换为 DLPack 张量。

Series.to_frame([name])

将Series转换为DataFrame

Series.to_hdf(path_or_buf, key, *args, **kwargs)

使用HDFStore将包含的数据写入HDF5文件。

Series.to_json([path_or_buf])

将cuDF对象转换为JSON字符串。

Series.to_numpy([dtype, copy, na_value])

将Frame转换为NumPy数组。

Series.to_pandas(*[, index, nullable, ...])

转换为 pandas Series。

Series.to_string()

转换为字符串

Series.from_arrow(array)

从 PyArrow 数组/分块数组创建。

Series.from_categorical(categorical[, codes])

从 pandas.Categorical 创建

Series.from_masked_array(data, mask[, ...])

创建一个带有空值掩码的Series。

Series.from_pandas(s[, nan_as_null])

从Pandas Series转换。

Series.hash_values([method, seed])

计算此列中值的哈希值。