> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GeoDataFrame.to_wkb

> Encode all geometry columns in the GeoDataFrame to WKB.

Encode all geometry columns in the GeoDataFrame to WKB.

## Signature

```python theme={"system"}
to_wkb(hex: bool = False, **kwargs) -> pspd.DataFrame
```

## Parameters

<ParamField path="hex" type="bool" default="False">
  If True, export WKB values as hexadecimal strings. By default,
  values are returned as binary objects.
</ParamField>

<ParamField path="kwargs">
  Shapely-specific serialization options are not supported by the
  distributed implementation and raise `NotImplementedError`.
</ParamField>

## Returns

<ResponseField name="return" type="pyspark.pandas.DataFrame">
  A distributed DataFrame with every geometry-typed column encoded
  as WKB and all other columns unchanged.
</ResponseField>

<Note>
  Duplicate column labels remain subject to pandas-on-Spark's DataFrame
  construction restrictions.

  Unlike GeoPandas, this method returns a lazy pandas-on-Spark DataFrame.
  Call `to_pandas()` on the result to materialize a local pandas
  DataFrame.
</Note>

**See also**

* `GeoDataFrame.to_wkt`
* `GeoSeries.to_wkb`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.