+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "sortDataFrame"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++

## sortDataFrame() function

### sortDataFrame() function

<b>Signature</b>

```typescript
export declare function sortDataFrame(data: DataFrame, sortIndex?: number, reverse?: boolean): DataFrame;
```
<b>Import</b>

```typescript
import { sortDataFrame } from '@grafana/data';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  data | <code>DataFrame</code> |  |
|  sortIndex | <code>number</code> |  |
|  reverse | <code>boolean</code> |  |

<b>Returns:</b>

`DataFrame`

