

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

`FormatCase` 変換により、列内の各文字列が指定されたケースタイプに変更されます。

## 例
<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>

 `FormatCase` 変換により、「case\$1type="LOWER"」 パラメータに基づいて、「city」列の値が小文字に変換されます。結果の「df\$1output」 DataFrame には、元の「datasource1」 DataFrame のすべての列が含まれますが、「city」列値は小文字です。

## 方法
<a name="aws-glue-api-pyspark-transforms-FormatCase-_methods"></a>
+ [\$1\$1call\$1\$1](#aws-glue-api-pyspark-transforms-FormatCase-__call__)
+ [適用](#aws-glue-api-crawler-pyspark-transforms-FormatCase-apply)
+ [名前](#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)
+ [説明](#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>

`FormatCase` 変換により、列内の各文字列が指定されたケースタイプに変更されます。
+ `source_column` - 既存の列の名前。
+ `case_type` – サポートされているケースタイプは `CAPITAL`、`LOWER`、`UPPER`、`SENTENCE` です。

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

継承元は `GlueTransform` [適用](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>

継承元は `GlueTransform` [名前](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>

継承元は `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>

継承元は `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>

継承元は `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>

継承元は `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>

継承元は `GlueTransform` [説明](aws-glue-api-crawler-pyspark-transforms-GlueTransform.md#aws-glue-api-crawler-pyspark-transforms-GlueTransform-describe)。