lower() Method

Teradata® Python Package User Guide

brand
Teradata Vantage
prodname
Teradata Python Package
vrm_release
16.20
category
User Guide
featnum
B700-4006-098K

The lower() method maps character values to lowercase.

Example Prerequisite

>>> tdf = DataFrame('iris')
>>> tdf
               SepalLength  SepalWidth  PetalLength  PetalWidth             Name                                                                  
 
78                     6.0         2.9          4.5         1.5  Iris-versicolor
116                    6.5         3.0          5.5         1.8   Iris-virginica
93                     5.0         2.3          3.3         1.0  Iris-versicolor
133                    6.3         2.8          5.1         1.5   Iris-virginica
108                    6.7         2.5          5.8         1.8   Iris-virginica
26                     5.0         3.4          1.6         0.4      Iris-setosa
131                    7.9         3.8          6.4         2.0   Iris-virginica
76                     6.8         2.8          4.8         1.4  Iris-versicolor
38                     4.4         3.0          1.3         0.2      Iris-setosa
61                     5.9         3.0          4.2         1.5  Iris-versicolor

Example

>>> tdf.assign(drop_columns = True, lower = tdf.Name.str.lower())
 
             lower
0  iris-versicolor
1   iris-virginica
2  iris-versicolor
3   iris-virginica
4   iris-virginica
5      iris-setosa
6   iris-virginica
7  iris-versicolor
8      iris-setosa
9  iris-versicolor

Example

>>> tdf[tdf.Name.str.lower() == 'iris-virginica']
 
               SepalLength  SepalWidth  PetalLength  PetalWidth            Name
                                                                  
139                    6.9         3.1          5.4         2.1  Iris-virginica
137                    6.4         3.1          5.5         1.8  Iris-virginica
114                    5.8         2.8          5.1         2.4  Iris-virginica
116                    6.5         3.0          5.5         1.8  Iris-virginica
131                    7.9         3.8          6.4         2.0  Iris-virginica
120                    6.9         3.2          5.7         2.3  Iris-virginica
118                    7.7         2.6          6.9         2.3  Iris-virginica
135                    7.7         3.0          6.1         2.3  Iris-virginica
133                    6.3         2.8          5.1         1.5  Iris-virginica
122                    7.7         2.8          6.7         2.0  Iris-virginica