

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

# FormatCase classe
<a name="aws-glue-api-pyspark-transforms-FormatCase"></a>

La transformation `FormatCase` remplace chaque chaîne d’une colonne par le type de cas spécifié.

## Exemple
<a name="pyspark-FormatCase-examples"></a>

```
from pyspark.context import SparkContext
from pyspark.sql import SparkSession
from awsgluedi.transforms import *

sc = SparkContext()
spark = SparkSession(sc)

datasource1 = spark.read.json("s3://${BUCKET}/json/zips/raw/data")

try:
    df_output = data_cleaning.FormatCase.apply(
        data_frame=datasource1,
        spark_context=sc,
        source_column="city",
        case_type="LOWER"
    )    
except:
    print("Unexpected Error happened ")
    raise
```

## Output
<a name="pyspark-FormatCase-output"></a>

 La transformation `FormatCase` convertira les valeurs de la colonne `city` en minuscules en fonction du paramètre `case\$1type="LOWER"`. Le `df\$1output` qui en DataFrame résultera contiendra toutes les colonnes du `datasource1` original, mais avec les valeurs des colonnes `city` DataFrame en minuscules. 

## Méthodes
<a name="aws-glue-api-pyspark-transforms-FormatCase-_methods"></a>
+ [\$1\$1call\$1\$1](#aws-glue-api-pyspark-transforms-FormatCase-__call__)
+ [s'appliquent](#aws-glue-api-crawler-pyspark-transforms-FormatCase-apply)
+ [name](#aws-glue-api-crawler-pyspark-transforms-FormatCase-name)
+ [describeArgs](#aws-glue-api-crawler-pyspark-transforms-FormatCase-describeArgs)
+ [describeReturn](#aws-glue-api-crawler-pyspark-transforms-FormatCase-describeReturn)
+ [describeTransform](#aws-glue-api-crawler-pyspark-transforms-FormatCase-describeTransform)
+ [describeErrors](#aws-glue-api-crawler-pyspark-transforms-FormatCase-describeErrors)
+ [describe](#aws-glue-api-crawler-pyspark-transforms-FormatCase-describe)

## \$1\$1call\$1\$1(spark\$1context, data\$1frame, source\$1column, case\$1type)
<a name="aws-glue-api-pyspark-transforms-FormatCase-__call__"></a>

La transformation `FormatCase` remplace chaque chaîne d’une colonne par le type de cas spécifié.
+ `source_column` : nom d’une colonne existante.
+ `case_type` : les types de casse pris en charge sont `CAPITAL`, `LOWER`, `UPPER` et `SENTENCE`. 

## apply(cls, \$1args, \$1\$1kwargs)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-apply"></a>

Hérité de `GlueTransform` [s'appliquent](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-apply).

## name(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-name"></a>

Hérité de `GlueTransform` [name](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-name).

## describeArgs(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-describeArgs"></a>

Hérité de `GlueTransform` [describeArgs](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeArgs).

## describeReturn(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-describeReturn"></a>

Hérité de `GlueTransform` [describeReturn](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeReturn).

## describeTransform(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-describeTransform"></a>

Hérité de `GlueTransform` [describeTransform](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeTransform).

## describeErrors(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-describeErrors"></a>

Hérité de `GlueTransform` [describeErrors](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describeErrors).

## describe(cls)
<a name="aws-glue-api-crawler-pyspark-transforms-FormatCase-describe"></a>

Hérité de `GlueTransform` [describe](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describe).