Text Case Transform
The Text Case transform allows you to change the capitalization of text in your dataset. This is useful for standardizing text data, improving readability, or preparing data for case-sensitive operations.
Basic Usage
To apply text case transformations to your dataset:
- Select the Text Case transform from the transform menu.
- Choose the columns you want to transform in the "Columns to Consider" field.
- Select the desired text case option.
- Apply the transformation.
Configuration Options
Basic Options
- Columns to Consider: Select the columns to apply the text case transformation. Only non-numeric columns will be available for selection.
- Text Case Option: Choose the type of case transformation to apply:
UPPERCASE: Convert all text to uppercase.lowercase: Convert all text to lowercase.Title Case: Capitalize the first letter of each word.
Examples
Here are some examples of how to use the Text Case transform:
Example 1: Converting to Uppercase
Input Dataset:
| Name | City | Age |
|---|---|---|
| john doe | New York | 30 |
| Jane Doe | Los Angeles | 25 |
| bob smith | Chicago | 35 |
Configuration:
- Columns to Consider:
Name,City - Text Case Option:
UPPERCASE
Result:
| Name | City | Age |
|---|---|---|
| JOHN DOE | NEW YORK | 30 |
| JANE DOE | LOS ANGELES | 25 |
| BOB SMITH | CHICAGO | 35 |
Example 2: Converting to Title Case
Input Dataset:
| Product | Category | Price |
|---|---|---|
| LAPTOP PRO | electronics | 999.99 |
| wireless mouse | ACCESSORIES | 29.99 |
| USB-C cable | accessories | 14.99 |
Configuration:
- Columns to Consider:
Product,Category - Text Case Option:
Title Case
Result:
| Product | Category | Price |
|---|---|---|
| Laptop Pro | Electronics | 999.99 |
| Wireless Mouse | Accessories | 29.99 |
| Usb-C Cable | Accessories | 14.99 |
When working with proper nouns or abbreviations, be cautious when using the Title Case or UPPERCASE options, as they might not always produce the desired results for specific terms.
The Text Case transform only affects text data. Numeric columns and non-string data types will not be modified by this transformation.
Best Practices
-
Standardize Input Data: Before applying text case transformations, ensure your input data is clean and consistent to avoid unexpected results.
-
Consider Context: Choose the appropriate text case based on the context of your data and its intended use.
-
Preserve Original Data: If the original text case might be important, consider creating new columns for the transformed text rather than overwriting existing ones.
-
Handle Special Cases: Be aware that certain words or abbreviations might need special handling after a text case transformation.
-
Review Results: Always review the results of your text case transformation, especially for data with mixed case requirements or special formatting.