> ## 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.

# GeoSeries.to_wkb

> Convert GeoSeries geometries to WKB

Convert GeoSeries geometries to WKB

## Signature

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

## Parameters

<ParamField path="hex" type="bool" default="False">
  If true, export the WKB as a hexadecimal string.
  The default is to return a binary bytes object.
</ParamField>

<ParamField path="kwargs">
  Additional keyword args will be passed to
  `shapely.to_wkb`.
</ParamField>

## Returns

<ResponseField name="return" type="Series">
  WKB representations of the geometries
</ResponseField>

**See also**

* `GeoSeries.to_wkt`

## Examples

```python theme={"system"}
>>> from shapely.geometry import Point, Polygon
>>> s = GeoSeries(
...     [
...         Point(0, 0),
...         Polygon(),
...         Polygon([(0, 0), (1, 1), (1, 0)]),
...         None,
...     ]
... )
```

```python theme={"system"}
>>> s.to_wkb()
0    b'���������...
1              b'�������'
2    b'�������...
3                                                 None
dtype: object
```

```python theme={"system"}
>>> s.to_wkb(hex=True)
0           010100000000000000000000000000000000000000
1                                   010300000000000000
2    0103000000010000000400000000000000000000000000...
3                                                 None
dtype: object
```


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