# Data Table🔮

## What is data table

A data table is a **typed, structured two-dimensional table** that serves as the basis for data analysis.&#x20;

It can be simply understood as similar to a database table or a structured excel table (no merging rows, skipping rows, etc.).

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2F5CjOAKDrdCNn7RE4vBUu%2Fimage.png?alt=media&#x26;token=c574e585-ad9e-411a-9561-0a5e038af2e1" alt=""><figcaption></figcaption></figure>

### Column Type

In Bayeslab, we keep a simple type structure:&#x20;

* Text
  * for short or long strings.
* Number
  * for integer types
* Real
  * For decimal/money types
* Date
  * For various type of dates regardless of format

## Import from file

When you import your data into Bayeslab, you can use excel or csv files to do so, or directly reference [external sources](https://bayeslab.gitbook.io/docs/connect-to-data/external-sources).

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FWSAOhCpd7yscP86ZFhGd%2Fimage.png?alt=media&#x26;token=1baaeb59-7b02-4156-831e-cf7b9d1207b2" alt=""><figcaption></figcaption></figure>

Then upload files or choose from what you already uploaded to this project

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FvKeXwbImNuFoUdq1NU5Z%2Fimage.png?alt=media&#x26;token=de965f51-6a8e-4d6f-ad37-eefc63b0b697" alt=""><figcaption></figcaption></figure>

Seeing a preview of your files data, click next

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FnrQ64KvNhTPMLusajreb%2Fimage.png?alt=media&#x26;token=94150f12-f0df-47c0-af8f-656eef9bf092" alt=""><figcaption></figcaption></figure>

You'll see Bayeslab automatically analyze the data, assign correct Type and generate corresponding descriptions.&#x20;

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FBzcCbgAlHexpnVdtKLjY%2Fimage.png?alt=media&#x26;token=6d6145cb-52d9-4311-be1b-63d89489b7b8" alt=""><figcaption></figcaption></figure>

Also, it generates an assessment of the data quality and provide recommendations to do if the quality is not so good.

Click Confirm and you'll see your table is now added.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2F1mK5HwcTL49VroOzJHeO%2Fimage.png?alt=media&#x26;token=01c581ce-78d1-4b5a-ae50-ab8fad06e00d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
All data table are accessible from all projects.  If you'd like to remove this table from current project but keep for others, use "Unbind" to remove.
{% endhint %}

## Writeback

By default, AI would not try to write anything back to data table.&#x20;

If you'd like to do so, simply add **"write back"** or anything similar as part of your prompt.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2Fbz9mimxMTh1o0c9AoCa9%2Fimage.png?alt=media&#x26;token=1663676a-10f0-4c19-9f1e-bb856c745ccc" alt=""><figcaption></figcaption></figure>

## Preview Data

Click anywhere with that table name, you'll see data preview on the right.&#x20;

See [here](https://bayeslab.gitbook.io/docs/analyze-visualize/data-preview) for more details on this panel.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2F2Xb8PdZ99MGHg25IDKV7%2Fimage.png?alt=media&#x26;token=8dfb0db9-f3fb-4353-9577-f039b83d1ec1" alt=""><figcaption></figcaption></figure>

## Table Copilot

By clicking "AI" in Data Preview, you're now in one of the most interesting feature of Bayeslab: Table Copilot

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FCJSuPDXSModWIfgeTekH%2Fimage.png?alt=media&#x26;token=d6119e98-33b7-4fad-a12d-c68cb87cdb3c" alt=""><figcaption></figcaption></figure>

You'll see firstly it automatically analyze the data in various aspects (schema, data quality.. etc).

Then it follows with recommendations, sample questions, and some ready to do actions.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FmFwdwI0hAWWnB6aew9mu%2Fimage.png?alt=media&#x26;token=b406545e-9ac1-4a5f-9bce-81236dba6e08" alt=""><figcaption></figcaption></figure>

Each of the actions here are uniquely put into your current data's context, and provide pinpointed recommendations.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FdscDNFnZIlFFHlb4UaNK%2Fimage.png?alt=media&#x26;token=a4784c59-6854-4208-b00b-4ee1d1659186" alt=""><figcaption></figcaption></figure>

Pay special attention to "Editor", which represents you can directly send this back to editor as an AI block and try run it!

For example, "automatic explore" would send back to editor as below:

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FZ0i7WzBQYUoYJFckqbUk%2Fimage.png?alt=media&#x26;token=e2ddbac2-d35e-4146-bfda-d88970fa061c" alt=""><figcaption></figcaption></figure>

Click "Run" will give AI a chance to explore on it's own and produce several interesting results.

<figure><img src="https://2463519681-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjXlg9zqMASkILutGQsH%2Fuploads%2FbVHkreiYmz6hjHgJoQnt%2Fimage.png?alt=media&#x26;token=7c76e246-b867-4725-a79f-ce92d1dd926c" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Try this on every data table, have fun!
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bayeslab.gitbook.io/docs/connect-to-data/data-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
