> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/and/table/compare-in.md).

# 比较列内值

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-66bbb7d0bc3f149de88bcebe005585c06a08698c%2Fimage%20(97).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## **用途：**

此 DocBits 卡片用于比较指定表格中的两列，并允许用户根据每列中的值设置条件。此外，此卡片还包含依赖项功能：只有当第三列中的值与指定的 Python 正则表达式模式匹配时，才会执行比较。这种设置适用于需要根据数据集中的多个数据点进行条件检查的场景。

## **功能：**

* **带依赖项的列比较：** 此卡片根据设定的条件比较两列中的值；只有当第三个“依赖项”列中的值与定义的 Python 正则表达式模式匹配时，才会应用该条件。
* **运算符：** 用户可以为列比较选择以下运算符：
  * **等于 (=)：** 检查两列中的值是否完全相等。
  * **不等于 (≠)：** 确保两列中的值不相等。
  * **大于 (>)：** 确认第一列中的值是否大于第二列中的值。
  * **大于或等于 (≥)：** 确保第一列中的值大于或等于第二列中的值。
  * **小于 (<)：** 检查第一列中的值是否小于第二列中的值。
  * **小于或等于 (≤)：** 确保第一列中的值小于或等于第二列中的值。
* **正则表达式依赖项：** 此卡片包含依赖项功能，允许用户为第三列定义正则表达式模式。只有当依赖项列中至少有一个值与该正则表达式匹配时，才会应用比较条件。

## **用法：**

在需要复杂条件逻辑的场景中，此卡片特别有用，例如依赖数据点之间关系的质量检查，以及基于数据格式或特定模式的附加条件。

***

## **示例场景：**

* 用户配置此卡片，在“Stock”表中比较“Quantity”和“Threshold”列，条件为 **Quantity ≥ Threshold**。只有当“Item Code”列与特定代码格式的正则表达式模式匹配时，才会执行此比较，例如 **^A\d{3}$**（表示物料代码以“A”开头，后跟三位数字）。

借助“条件列比较”卡片，组织可以在数据集中创建高级的、依赖模式的比较，从而实现精细的数据处理，并提高条件工作流的准确性。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/chinese/guan-li-yu-she-zhi/workflow/cards-overview/and/table/compare-in.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
