---
title: desc_nulls_first (Column)
description: "Column.desc\\_nulls\\_first method in PySpark: Sort the column in descending order with null values appearing first."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/column/desc_nulls_first
---

# desc\_nulls\_first (Column)

Sort the column in descending order with null values appearing first.

## Syntax

```python
desc_nulls_first()
```

## Returns

Column

## Examples

```python
from pyspark.sql import Row
df = spark.createDataFrame(
    [('Tom', 80), (None, 60), ('Alice', None)], ["name", "height"])
df.select(df.name).orderBy(df.name.desc_nulls_first()).collect()
```

```Output
# [Row(name=None), Row(name='Tom'), Row(name='Alice')]
```
