> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-r/reference/table/tableusdto_data_frame.md).

# Table$to\_data\_frame

### Table$<mark style="color:purple;">to\_data\_frame</mark>(max\_results=NULL, variables=NULL, batch\_preprocessor=NULL, max\_parallelization=parallely::availableCores(), labelled=FALSE) → [data.frame](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/data.frame)

Returns a [data.frame](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/data.frame) representing a table.

{% hint style="info" %}
Also callable on [Queries](/api/client-libraries/redivis-r/reference/query.md) and [Uploads](/api/client-libraries/redivis-r/reference/upload.md) → `query$to_data_frame(...)` | `upload$to_data_frame(...)`
{% endhint %}

### **Parameters:**

**`max_results` :&#x20;*****int, default NULL***\
The max number of records to load into the dataframe. If not specified, the entire table will be loaded.

**`variables` :&#x20;*****list(str)*****&#x20;|&#x20;*****character vector***\
The specific variables to return, e.g., `variables = c("name", "date")` . If not specified, all variables in the table will be returned.

**`batch_preprocessor` :&#x20;*****function, default NULL***\
Function used to preprocess the data, invoked for each batch of records as they are initially loaded. This can be helpful in reducing the size of the data before the final table is loaded. The function accepts one argument, an [Arrow RecordBatch](https://arrow.apache.org/docs/dev/r/reference/RecordBatch.html), and must return a Arrow RecordBatch or `NULL`. If you prefer to work with the data solely in a streaming manner, see [`Table$to_arrow_batch_reader()`](/api/client-libraries/redivis-r/reference/table/tableusdto_arrow_batch_reader.md)

**`max_parallelization` :&#x20;*****int, default parallely::availableCores()***\
The maximum parallelization when loading the table. Uses the `future::multicore` strategy when supported, falling back to `future::multisession` if not.

**`labelled` :&#x20;*****bool, default FALSE***\
If `TRUE`, the variable labels and value labels documented on Redivis are attached to the returned columns, following the conventions of the [haven](https://haven.tidyverse.org/) package. See [`Table$to_tibble()`](/api/client-libraries/redivis-r/reference/table/tableusdto_tibble.md) for more details. Requires the `haven` package to be installed.

### **Returns:**

[**data.frame**](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/data.frame)


---

# 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.redivis.com/api/client-libraries/redivis-r/reference/table/tableusdto_data_frame.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.
