> For the complete documentation index, see [llms.txt](https://danfo.jsdata.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://danfo.jsdata.org/api-reference/configuration-options.md).

# Configuration Options

On DataFrame/Series creation, a config object can be passed along to configure some internal properties of the created object. The following list shows what options are available and what they do.

| Parameter          | Description                                                                                                                                                                                                          |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tableDisplayConfig | **Object**, General table display options. Because we use the table package under the hood to display a table in the console, all [table display configurations](https://www.npmjs.com/package/table) are supported. |
| tableMaxRow        | **Number**, the total number of rows to display in the console when the **print** function is called. Defaults to 10                                                                                                 |
| dtypeTestLim       | **Number**, the total number of values to test when inferring data type. Defaults to 20                                                                                                                              |
| lowMemoryMode      | <p><strong>Boolean</strong>, whether to use minimal memory space or not. Defaults to false.<br><strong>Note:</strong> There's a slight decrease in speed when low memory mode is set to true.</p>                    |

> See an example of creating DataFrame [in low memory mode](/api-reference/dataframe/creating-a-dataframe.md#creating-a-dataframe-and-specifying-memory-mode)

## Examples of setting configs

### Add a DataFrame header

```javascript
 const data = {
                "Name": ["Apples", "Mango", "Banana", "Pear"],
                "Count": [21, 5, 30, 10],
                "Price": [200, 300, 40, 250]
            };
const df = new DataFrame(data, {
    config: {
        tableDisplayConfig: {
            header: {
                alignment: 'center',
                content: 'THE HEADER\nThis is the table about something',
            },
        },
    }
});
df.print()
```

```javascript
╔════════════════════════════════════════════════════════════════════════╗
║                               THE HEADER                               ║
║                   This is the table about something                    ║
╟────────────┬───────────────────┬───────────────────┬───────────────────╢
║            │ Name              │ Count             │ Price             ║
╟────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 0          │ Apples            │ 21                │ 200               ║
╟────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 1          │ Mango             │ 5                 │ 300               ║
╟────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 2          │ Banana            │ 30                │ 40                ║
╟────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 3          │ Pear              │ 10                │ 250               ║
╚════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
```

### Configure column size and display format of DataFrame

```javascript
const data = {
    "Name": ["Apples", "Mango", "Banana", "Pear"],
    "Count": [21, 5, 30, 10],
    "Price": [200, 300, 40, 250]
};
const df = new DataFrame(data, {
    config: {
        tableDisplayConfig: {
            header: {
                alignment: 'center',
                content: 'THE HEADER\nThis is the table about something',
            },
            columns: [
                { alignment: 'left' },
                { alignment: 'center', width: 20 },
                { alignment: 'right' },
                { alignment: 'justify' }
            ],
        },
    }
});
df.print()
```

```javascript
╔══════════════════════════════════════════╗
║                THE HEADER                ║
║    This is the table about something     ║
╟───┬──────────────────────┬───────┬───────╢
║   │         Name         │ Count │ Price ║
╟───┼──────────────────────┼───────┼───────╢
║ 0 │        Apples        │    21 │ 200   ║
╟───┼──────────────────────┼───────┼───────╢
║ 1 │        Mango         │     5 │ 300   ║
╟───┼──────────────────────┼───────┼───────╢
║ 2 │        Banana        │    30 │ 40    ║
╟───┼──────────────────────┼───────┼───────╢
║ 3 │         Pear         │    10 │ 250   ║
╚═══╧══════════════════════╧═══════╧═══════╝
```

### Configure the number of rows displayed when **print** is called

```javascript
const data = {
    "Name": ["Apples", "Mango", "Banana", "Pear"],
    "Count": [21, 5, 30, 10],
    "Price": [200, 300, 40, 250],

};
const df = new DataFrame(data, {
    config: {
        tableMaxColInConsole: 6,
        tableMaxRow: 1
    }
});
df.print()
```

```
╔════════════╤═══════════════════╤═══════════════════╤═══════════════════╗
║            │ Name              │ Count             │ Price             ║
╟────────────┼───────────────────┼───────────────────┼───────────────────╢
║ 0          │ Apples            │ 21                │ 200               ║
╚════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
```


---

# 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 dynamically by asking a question.

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

```
GET https://danfo.jsdata.org/api-reference/configuration-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
