当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python pyspark Series.str.lower用法及代码示例


本文简要介绍 pyspark.pandas.Series.str.lower 的用法。

用法:

str.lower() → ps.Series

将 Series/Index 中的字符串转换为全小写。

例子

>>> s = ps.Series(['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe'])
>>> s
0                 lower
1              CAPITALS
2    this is a sentence
3              SwApCaSe
dtype: object
>>> s.str.lower()
0                 lower
1              capitals
2    this is a sentence
3              swapcase
dtype: object

相关用法


注:本文由纯净天空筛选整理自spark.apache.org大神的英文原创作品 pyspark.pandas.Series.str.lower。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。