---
description: Processing components process and transform data within a flow.
---

# Processing

### Use a processing component in a flow[​](https://docs.langflow.org/components-processing#use-a-processing-component-in-a-flow) <a href="#use-a-processing-component-in-a-flow" id="use-a-processing-component-in-a-flow"></a>

The **Split Text** processing component in this flow splits the incoming [Data](data) into chunks to be embedded into the vector store component.

The component offers control over chunk size, overlap, and separator, which affect context and granularity in vector store retrieval results.

![A vector store ingesting documents](https://docs.langflow.org/assets/images/vector-store-document-ingestion-fce32e9be440846a2545397e3a18b7bf.png)

### Combine data[​](https://docs.langflow.org/components-processing#combine-data) <a href="#combine-data" id="combine-data"></a>

This component combines multiple data sources into a single unified [Data](data) object.

The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs) <a href="#inputs" id="inputs"></a>

| Name | Display Name | Info                                 |
| ---- | ------------ | ------------------------------------ |
| data | Data         | A list of data objects to be merged. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs) <a href="#outputs" id="outputs"></a>

| Name         | Display Name | Info                                                                                                                                            |
| ------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| merged\_data | Merged Data  | A single [Data](https://docs.langflow.org/concepts-objects#data-object) object containing the combined information from all input data objects. |

### Combine text[​](https://docs.langflow.org/components-processing#combine-text) <a href="#combine-text" id="combine-text"></a>

This component concatenates two text sources into a single text chunk using a specified delimiter.

1. To use this component in a flow, connect two components that output Messages to the **Combine Text** component's **First Text** and **Second Text** inputs. This example uses two **Text Input** components.

![Combine text component](https://docs.langflow.org/assets/images/component-combine-text-a73b71c22cc8099bf2a9ba22170ea701.png)

2. In the **Combine Text** component, in the **Text** fields of both **Text Input** components, enter some text to combine.
3. In the **Combine Text** component, enter an optional **Delimiter** value. The delimiter character separates the combined texts. This example uses `\n\n **end first text** \n\n **start second text** \n` to label the texts and create newlines between them.
4. Connect a **Chat Output** component to view the text combination.
5. Click **Playground**, and then click **Run Flow**. The combined text appears in the **Playground**.

```
This is the first text. Let's combine text!
end first text
start second text
Here's the second part. We'll see how combining text works.
```

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-1) <a href="#inputs-1" id="inputs-1"></a>

| Name         | Display Name | Info                                                                |
| ------------ | ------------ | ------------------------------------------------------------------- |
| first\_text  | First Text   | The first text input to concatenate.                                |
| second\_text | Second Text  | The second text input to concatenate.                               |
| delimiter    | Delimiter    | A string used to separate the two text inputs. Defaults to a space. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-1) <a href="#outputs-1" id="outputs-1"></a>

| Name    | Display Name | Info                                                                                                        |
| ------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
| message | Message      | A [Message](https://docs.langflow.org/concepts-objects#message-object) object containing the combined text. |

### DataFrame operations[​](https://docs.langflow.org/components-processing#dataframe-operations) <a href="#dataframe-operations" id="dataframe-operations"></a>

This component performs operations on [DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) rows and columns.

To use this component in a flow, connect a component that outputs [DataFrame](#dataframe-operations) to the **DataFrame Operations** component.

This example fetches JSON data from an API. The **Lambda filter** component extracts and flattens the results into a tabular DataFrame. The **DataFrame Operations** component can then work with the retrieved data.

![Dataframe operations with flattened dataframe](https://docs.langflow.org/assets/images/component-dataframe-operations-86f6e1111b6f414989aca7b5fe625830.png)

1. The **API Request** component retrieves data with only `source` and `result` fields. For this example, the desired data is nested within the `result` field.
2. Connect a **Lambda Filter** to the API request component, and a **Language model** to the **Lambda Filter**. This example connects a **Groq** model component.
3. In the **Groq** model component, add your **Groq** API key.
4. To filter the data, in the **Lambda filter** component, in the **Instructions** field, use natural language to describe how the data should be filtered. For this example, enter:

`I want to explode the result column out into a Data object`

{% hint style="warning" %}
Avoid punctuation in the **Instructions** field, as it can cause errors.
{% endhint %}

5. To run the flow, in the **Lambda Filter** component, click .
6. To inspect the filtered data, in the **Lambda Filter** component, click . The result is a structured DataFrame.

```markdown
id | name             | company               | username        | email                              | address           | zip
---|------------------|----------------------|-----------------|------------------------------------|-------------------|-------
1  | Emily Johnson    | ABC Corporation      | emily_johnson   | emily.johnson@abccorporation.com   | 123 Main St       | 12345
2  | Michael Williams | XYZ Corp             | michael_williams| michael.williams@xyzcorp.com       | 456 Elm Ave       | 67890
```

7. Add the **DataFrame Operations** component, and a **Chat Output** component to the flow.
8. In the **DataFrame Operations** component, in the **Operation** field, select **Filter**.
9. To apply a filter, in the **Column Name** field, enter a column to filter on. This example filters by `name`.
10. Click **Playground**, and then click **Run Flow**. The flow extracts the values from the `name` column.

> name\
> Emily Johnson\
> Michael Williams\
> John Smith\
> ...

#### Operations[​](https://docs.langflow.org/components-processing#operations) <a href="#operations" id="operations"></a>

This component can perform the following operations on Pandas [DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html).

| Operation      | Description                             | Required Inputs                                  |
| -------------- | --------------------------------------- | ------------------------------------------------ |
| Add Column     | Adds a new column with a constant value | new\_column\_name, new\_column\_value            |
| Drop Column    | Removes a specified column              | column\_name                                     |
| Filter         | Filters rows based on column value      | column\_name, filter\_value                      |
| Head           | Returns first n rows                    | num\_rows                                        |
| Rename Column  | Renames an existing column              | column\_name, new\_column\_name                  |
| Replace Value  | Replaces values in a column             | column\_name, replace\_value, replacement\_value |
| Select Columns | Selects specific columns                | columns\_to\_select                              |
| Sort           | Sorts DataFrame by column               | column\_name, ascending                          |
| Tail           | Returns last n rows                     | num\_rows                                        |

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-2) <a href="#inputs-2" id="inputs-2"></a>

| Name                | Display Name      | Info                                                                                                                                                |
| ------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| df                  | DataFrame         | The input DataFrame to operate on.                                                                                                                  |
| operation           | Operation         | Select the DataFrame operation to perform. Options: Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, Tail |
| column\_name        | Column Name       | The column name to use for the operation.                                                                                                           |
| filter\_value       | Filter Value      | The value to filter rows by.                                                                                                                        |
| ascending           | Sort Ascending    | Whether to sort in ascending order.                                                                                                                 |
| new\_column\_name   | New Column Name   | The new column name when renaming or adding a column.                                                                                               |
| new\_column\_value  | New Column Value  | The value to populate the new column with.                                                                                                          |
| columns\_to\_select | Columns to Select | List of column names to select.                                                                                                                     |
| num\_rows           | Number of Rows    | Number of rows to return (for head/tail). Default: 5                                                                                                |
| replace\_value      | Value to Replace  | The value to replace in the column.                                                                                                                 |
| replacement\_value  | Replacement Value | The value to replace with.                                                                                                                          |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-2) <a href="#outputs-2" id="outputs-2"></a>

| Name   | Display Name | Info                                         |
| ------ | ------------ | -------------------------------------------- |
| output | DataFrame    | The resulting DataFrame after the operation. |

### Data to DataFrame[​](https://docs.langflow.org/components-processing#data-to-dataframe) <a href="#data-to-dataframe" id="data-to-dataframe"></a>

This component converts one or multiple [Data](data) objects into a [DataFrame](#dataframe-operations). Each Data object corresponds to one row in the resulting DataFrame. Fields from the `.data` attribute become columns, and the `.text` field (if present) is placed in a 'text' column.

1. To use this component in a flow, connect a component that outputs [Data](data) to the **Data to Dataframe** component's input. This example connects a **Webhook** component to convert `text` and `data` into a DataFrame.
2. To view the flow's output, connect a **Chat Output** component to the **Data to Dataframe** component.

![A webhook and data to dataframe](https://docs.langflow.org/assets/images/component-data-to-dataframe-3e921379e4e86fedf0e34e3ffae46b51.png)

3. Send a POST request to the **Webhook** containing your JSON data. Replace `YOUR_FLOW_ID` with your flow ID. This example uses the default Langflow server address.

```javascript
curl -X POST "https://use.broxi.ai/api/v1/webhook/YOUR_FLOW_ID" \
-H 'Content-Type: application/json' \
-d '{
    "text": "Alex Cruz - Employee Profile",
    "data": {
        "Name": "Alex Cruz",
        "Role": "Developer",
        "Department": "Engineering"
    }
}'
```

4. In the **Playground**, view the output of your flow. The **Data to DataFrame** component converts the webhook request into a `DataFrame`, with `text` and `data` fields as columns.

```markdown
| text                         | data                                                                    |
|:-----------------------------|:------------------------------------------------------------------------|
| Alex Cruz - Employee Profile | {'Name': 'Alex Cruz', 'Role': 'Developer', 'Department': 'Engineering'} |
```

5. Send another employee data object.

```json
curl -X POST "https://use.broxi.ai/api/v1/webhook/YOUR_FLOW_ID" \
-H 'Content-Type: application/json' \
-d '{
    "text": "Kalani Smith - Employee Profile",
    "data": {
        "Name": "Kalani Smith",
        "Role": "Designer",
        "Department": "Design"
    }
}'
```

6. In the **Playground**, this request is also converted to `DataFrame`.

```markdown
| text                            | data                                                                 |
|:--------------------------------|:---------------------------------------------------------------------|
| Kalani Smith - Employee Profile | {'Name': 'Kalani Smith', 'Role': 'Designer', 'Department': 'Design'} |
```

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-3) <a href="#inputs-3" id="inputs-3"></a>

| Name       | Display Name      | Info                                                        |
| ---------- | ----------------- | ----------------------------------------------------------- |
| data\_list | Data or Data List | One or multiple Data objects to transform into a DataFrame. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-3) <a href="#outputs-3" id="outputs-3"></a>

| Name      | Display Name | Info                                                                   |
| --------- | ------------ | ---------------------------------------------------------------------- |
| dataframe | DataFrame    | A DataFrame built from each Data object's fields plus a 'text' column. |

### Filter data[​](https://docs.langflow.org/components-processing#filter-data) <a href="#filter-data" id="filter-data"></a>

This component filters a [Data](data) object based on a list of keys.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-4) <a href="#inputs-4" id="inputs-4"></a>

| Name             | Display Name    | Info                       |
| ---------------- | --------------- | -------------------------- |
| data             | Data            | Data object to filter.     |
| filter\_criteria | Filter Criteria | List of keys to filter by. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-4) <a href="#outputs-4" id="outputs-4"></a>

| Name           | Display Name  | Info                                                                                                                                            |
| -------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| filtered\_data | Filtered Data | A new [Data](https://docs.langflow.org/concepts-objects#data-object) object containing only the key-value pairs that match the filter criteria. |

### Filter values[​](https://docs.langflow.org/components-processing#filter-values) <a href="#filter-values" id="filter-values"></a>

The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-5) <a href="#inputs-5" id="inputs-5"></a>

| Name          | Display Name        | Info                                            |
| ------------- | ------------------- | ----------------------------------------------- |
| input\_data   | Input data          | The list of data items to filter.               |
| filter\_key   | Filter Key          | The key to filter on, for example, 'route'.     |
| filter\_value | Filter Value        | The value to filter by, for example, 'CMIP'.    |
| operator      | Comparison Operator | The operator to apply for comparing the values. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-5) <a href="#outputs-5" id="outputs-5"></a>

| Name           | Display Name  | Info                                       |
| -------------- | ------------- | ------------------------------------------ |
| filtered\_data | Filtered data | The resulting list of filtered data items. |

### Lambda filter[​](https://docs.langflow.org/components-processing#lambda-filter) <a href="#lambda-filter" id="lambda-filter"></a>

This component uses an LLM to generate a Lambda function for filtering or transforming structured data.

To use the **Lambda filter** component, you must connect it to a [Language Model](ai-models) component, which the component uses to generate a function based on the natural language instructions in the **Instructions** field.

This example gets JSON data from the `https://jsonplaceholder.typicode.com/users` API endpoint. The **Instructions** field in the **Lambda filter** component specifies the task `extract emails`. The connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data.

![](https://docs.langflow.org/assets/images/component-lambda-filter-c409acffcea6f80062295f4d8de4e881.png)

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-6) <a href="#inputs-6" id="inputs-6"></a>

| Name                | Display Name   | Info                                                                                                                                                                           |
| ------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| data                | Data           | The structured data to filter or transform using a Lambda function.                                                                                                            |
| llm                 | Language Model | The connection port for a [Model](https://docs.langflow.org/components-models) component.                                                                                      |
| filter\_instruction | Instructions   | Natural language instructions for how to filter or transform the data using a Lambda function, such as `Filter the data to only include items where the 'status' is 'active'.` |
| sample\_size        | Sample Size    | For large datasets, the number of characters to sample from the dataset head and tail.                                                                                         |
| max\_size           | Max Size       | The number of characters for the data to be considered "large", which triggers sampling by the `sample_size` value.                                                            |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-6) <a href="#outputs-6" id="outputs-6"></a>

| Name           | Display Name  | Info                                                       |
| -------------- | ------------- | ---------------------------------------------------------- |
| filtered\_data | Filtered Data | The filtered or transformed [Data object](data).           |
| dataframe      | DataFrame     | The filtered data as a [DataFrame](#dataframe-operations). |

### LLM router[​](https://docs.langflow.org/components-processing#llm-router) <a href="#llm-router" id="llm-router"></a>

This component routes requests to the most appropriate LLM based on OpenRouter model specifications.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-7) <a href="#inputs-7" id="inputs-7"></a>

| Name         | Display Name    | Info                                                         |
| ------------ | --------------- | ------------------------------------------------------------ |
| models       | Language Models | List of LLMs to route between                                |
| input\_value | Input           | The input message to be routed                               |
| judge\_llm   | Judge LLM       | LLM that will evaluate and select the most appropriate model |
| optimization | Optimization    | Optimization preference (quality/speed/cost/balanced)        |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-7) <a href="#outputs-7" id="outputs-7"></a>

| Name            | Display Name   | Info                                 |
| --------------- | -------------- | ------------------------------------ |
| output          | Output         | The response from the selected model |
| selected\_model | Selected Model | Name of the chosen model             |

### Message to data[​](https://docs.langflow.org/components-processing#message-to-data) <a href="#message-to-data" id="message-to-data"></a>

This component converts Message objects to [Data](data) objects.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-8) <a href="#inputs-8" id="inputs-8"></a>

| Name    | Display Name | Info                                                    |
| ------- | ------------ | ------------------------------------------------------- |
| message | Message      | The Message object to convert to a [Data](data) object. |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-8) <a href="#outputs-8" id="outputs-8"></a>

| Name | Display Name | Info                               |
| ---- | ------------ | ---------------------------------- |
| data | Data         | The converted [Data](data) object. |

### Parser[​](https://docs.langflow.org/components-processing#parser) <a href="#parser" id="parser"></a>

This component formats `DataFrame` or `Data` objects into text using templates, with an option to convert inputs directly to strings using `stringify`.

To use this component, create variables for values in the `template` the same way you would in a Prompt component. For `DataFrames`, use column names, for example `Name: {Name}`. For `Data` objects, use `{text}`.

To use the **Parser** component with a **Structured Output** component, do the following:

1. Connect a **Structured Output** component's **DataFrame** output to the **Parser** component's **DataFrame** input.
2. Connect the **File** component to the **Structured Output** component's **Message** input.
3. Connect the **OpenAI** model component's **Language Model** output to the **Structured Output** component's **Language Model** input.

The flow looks like this:

![A parser component connected to OpenAI and structured output](https://docs.langflow.org/assets/images/component-parser-5f97943bbc863cee6b02c74d325a062f.png)

4. In the **Structured Output** component, click **Open Table**. This opens a pane for structuring your table. The table contains the rows **Name**, **Description**, **Type**, and **Multiple**.
5. Create a table that maps to the data you're loading from the **File** loader. For example, to create a table for employees, you might have the rows `id`, `name`, and `email`, all of type `string`.
6. In the **Template** field of the **Parser** component, enter a template for parsing the **Structured Output** component's DataFrame output into structured text. Create variables for values in the `template` the same way you would in a Prompt component. For example, to present a table of employees in Markdown:

```markdown
# Employee Profile
## Personal Information
- **Name:** {name}
- **ID:** {id}
- **Email:** {email}
```

7. To run the flow, in the **Parser** component, click .
8. To view your parsed text, in the **Parser** component, click .
9. Optionally, connect a **Chat Output** component, and open the **Playground** to see the output.

For an additional example of using the **Parser** component to format a DataFrame from a **Structured Output** component, see the **Market Research** template flow.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-9) <a href="#inputs-9" id="inputs-9"></a>

| Name        | Display Name      | Info                                                                                                                                                 |
| ----------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| mode        | Mode              | Tab selection between "Parser" and "Stringify" modes. "Stringify" converts input to a string instead of using a template.                            |
| pattern     | Template          | Template for formatting using variables in curly brackets. For DataFrames, use column names, such as `Name: {Name}`. For Data objects, use `{text}`. |
| input\_data | Data or DataFrame | The input to parse - accepts either a DataFrame or Data object.                                                                                      |
| sep         | Separator         | String used to separate rows/items. Default: newline.                                                                                                |
| clean\_data | Clean Data        | When stringify is enabled, cleans data by removing empty rows and lines.                                                                             |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-9) <a href="#outputs-9" id="outputs-9"></a>

| Name         | Display Name | Info                                                                                                           |
| ------------ | ------------ | -------------------------------------------------------------------------------------------------------------- |
| parsed\_text | Parsed Text  | The resulting formatted text as a [Message](https://docs.langflow.org/concepts-objects#message-object) object. |

### Split text[​](https://docs.langflow.org/components-processing#split-text) <a href="#split-text" id="split-text"></a>

This component splits text into chunks based on specified criteria. It's ideal for chunking data to be tokenized and embedded into vector databases.

The **Split Text** component outputs **Chunks** or **DataFrame**. The **Chunks** output returns a list of individual text chunks. The **DataFrame** output returns a structured data format, with additional `text` and `metadata` columns applied.

1. To use this component in a flow, connect a component that outputs [Data or DataFrame](#data-to-dataframe) to the **Split Text** component's **Data** port. This example uses the **URL** component, which is fetching JSON placeholder data.

![Split text component and chroma-db](https://docs.langflow.org/assets/images/component-split-text-741a1ac37f9a2d6591ead075acc66b65.png)

2. In the **Split Text** component, define your data splitting parameters.

This example splits incoming JSON data at the separator `},`, so each chunk contains one JSON object.

The order of precedence is **Separator**, then **Chunk Size**, and then **Chunk Overlap**. If any segment after separator splitting is longer than `chunk_size`, it is split again to fit within `chunk_size`.

After `chunk_size`, **Chunk Overlap** is applied between chunks to maintain context.

3. Connect a **Chat Output** component to the **Split Text** component's **DataFrame** output to view its output.
4. Click **Playground**, and then click **Run Flow**. The output contains a table of JSON objects split at `},`.

```json
{
"userId": 1,
"id": 1,
"title": "Introduction to Artificial Intelligence",
"body": "Learn the basics of Artificial Intelligence and its applications in various industries.",
"link": "https://example.com/article1",
"comment_count": 8
},
{
"userId": 2,
"id": 2,
"title": "Web Development with React",
"body": "Build modern web applications using React.js and explore its powerful features.",
"link": "https://example.com/article2",
"comment_count": 12
},

```

5. Clear the **Separator** field, and then run the flow again. Instead of JSON objects, the output contains 50-character lines of text with 10 characters of overlap.

> First chunk: "title": "Introduction to Artificial Intelligence""\
> Second chunk: "elligence", "body": "Learn the basics of Artif"\
> Third chunk: "s of Artificial Intelligence and its applications"

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-10) <a href="#inputs-10" id="inputs-10"></a>

| Name           | Display Name    | Info                                                                                                                                                                                        |
| -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| data\_inputs   | Input Documents | The data to split.The component accepts [Data](https://docs.langflow.org/concepts-objects#data-object) or [DataFrame](https://docs.langflow.org/concepts-objects#dataframe-object) objects. |
| chunk\_overlap | Chunk Overlap   | The number of characters to overlap between chunks. Default: `200`.                                                                                                                         |
| chunk\_size    | Chunk Size      | The maximum number of characters in each chunk. Default: `1000`.                                                                                                                            |
| separator      | Separator       | The character to split on. Default: `newline`.                                                                                                                                              |
| text\_key      | Text Key        | The key to use for the text column (advanced). Default: `text`.                                                                                                                             |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-10) <a href="#outputs-10" id="outputs-10"></a>

| Name      | Display Name | Info                                                                     |
| --------- | ------------ | ------------------------------------------------------------------------ |
| chunks    | Chunks       | List of split text chunks as [Data](data) objects.                       |
| dataframe | DataFrame    | List of split text chunks as [DataFrame](#dataframe-operations) objects. |

### Update data[​](https://docs.langflow.org/components-processing#update-data) <a href="#update-data" id="update-data"></a>

This component dynamically updates or appends data with specified fields.

#### Inputs[​](https://docs.langflow.org/components-processing#inputs-11) <a href="#inputs-11" id="inputs-11"></a>

| Name                 | Display Name       | Info                             |
| -------------------- | ------------------ | -------------------------------- |
| old\_data            | Data               | The records to update            |
| number\_of\_fields   | Number of Fields   | Number of fields to add (max 15) |
| text\_key            | Text Key           | Key for text content             |
| text\_key\_validator | Text Key Validator | Validates text key presence      |

#### Outputs[​](https://docs.langflow.org/components-processing#outputs-11) <a href="#outputs-11" id="outputs-11"></a>

| Name | Display Name | Info                          |
| ---- | ------------ | ----------------------------- |
| data | Data         | Updated [Data](data) objects. |

### Legacy components[​](https://docs.langflow.org/components-processing#legacy-components) <a href="#legacy-components" id="legacy-components"></a>

**Legacy** components are available to use but no longer supported.

#### Alter metadata[​](https://docs.langflow.org/components-processing#alter-metadata) <a href="#alter-metadata" id="alter-metadata"></a>

This component modifies metadata of input objects. It can add new metadata, update existing metadata, and remove specified metadata fields. The component works with both Message and [Data](data) objects, and can also create a new Data object from user-provided text.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-12)

| Name           | Display Name     | Info                                                                                                              |
| -------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------- |
| input\_value   | Input            | Objects to which Metadata should be added                                                                         |
| text\_in       | User Text        | Text input; the value will be in the 'text' attribute of the [Data](data) object. Empty text entries are ignored. |
| metadata       | Metadata         | Metadata to add to each object                                                                                    |
| remove\_fields | Fields to Remove | Metadata fields to remove                                                                                         |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-12)

| Name | Display Name | Info                                            |
| ---- | ------------ | ----------------------------------------------- |
| data | Data         | List of Input objects, each with added metadata |

#### Create data[​](https://docs.langflow.org/components-processing#create-data) <a href="#create-data" id="create-data"></a>

This component dynamically creates a [Data](data) object with a specified number of fields.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-13)

| Name                 | Display Name       | Info                                                                       |
| -------------------- | ------------------ | -------------------------------------------------------------------------- |
| number\_of\_fields   | Number of Fields   | The number of fields to be added to the record.                            |
| text\_key            | Text Key           | Key that identifies the field to be used as the text content.              |
| text\_key\_validator | Text Key Validator | If enabled, checks if the given `Text Key` is present in the given `Data`. |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-13)

| Name | Display Name | Info                                                                  |
| ---- | ------------ | --------------------------------------------------------------------- |
| data | Data         | A [Data](data) object created with the specified fields and text key. |

#### Data to message[​](https://docs.langflow.org/components-processing#data-to-message) <a href="#data-to-message" id="data-to-message"></a>

The ParseData component converts data objects into plain text using a specified template. This component transforms structured data into human-readable text formats, allowing for customizable output through the use of templates.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-14)

| Name     | Display Name | Info                                                                                                                   |
| -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
| data     | Data         | The data to convert to text.                                                                                           |
| template | Template     | The template to use for formatting the data. It can contain the keys `{text}`, `{data}`, or any other key in the data. |
| sep      | Separator    | The separator to use between multiple data items.                                                                      |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-14)

| Name | Display Name | Info                                                     |
| ---- | ------------ | -------------------------------------------------------- |
| text | Text         | The resulting formatted text string as a Message object. |

#### Parse DataFrame[​](https://docs.langflow.org/components-processing#parse-dataframe) <a href="#parse-dataframe" id="parse-dataframe"></a>

This component converts DataFrames into plain text using templates.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-15)

| Name     | Display Name | Info                                                      |
| -------- | ------------ | --------------------------------------------------------- |
| df       | DataFrame    | The DataFrame to convert to text rows.                    |
| template | Template     | Template for formatting (use `{column_name}`placeholders. |
| sep      | Separator    | String to join rows in output.                            |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-15)

| Name | Display Name | Info                                |
| ---- | ------------ | ----------------------------------- |
| text | Text         | All rows combined into single text. |

#### Parse JSON[​](https://docs.langflow.org/components-processing#parse-json) <a href="#parse-json" id="parse-json"></a>

This component converts and extracts JSON fields using JQ queries.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-16)

| Name         | Display Name | Info                                             |
| ------------ | ------------ | ------------------------------------------------ |
| input\_value | Input        | Data object to filter (Message or [Data](data)). |
| query        | JQ Query     | JQ Query to filter the data                      |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-16)

| Name           | Display Name  | Info                                           |
| -------------- | ------------- | ---------------------------------------------- |
| filtered\_data | Filtered Data | Filtered data as list of [Data](data) objects. |

#### Select data[​](https://docs.langflow.org/components-processing#select-data) <a href="#select-data" id="select-data"></a>

This component selects a single [Data](data) item from a list.

**Inputs**[**​**](https://docs.langflow.org/components-processing#inputs-17)

| Name        | Display Name | Info                        |
| ----------- | ------------ | --------------------------- |
| data\_list  | Data List    | List of data to select from |
| data\_index | Data Index   | Index of the data to select |

**Outputs**[**​**](https://docs.langflow.org/components-processing#outputs-17)

| Name           | Display Name  | Info                              |
| -------------- | ------------- | --------------------------------- |
| selected\_data | Selected Data | The selected [Data](data) object. |

[\
](https://docs.langflow.org/components-models)
