# xarray.Dataset.differentiate

#### Dataset.differentiate(coord, edge_order=1, datetime_unit=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L8613-L8681)

Differentiate with the second order accurate central
differences.

#### NOTE
This feature is limited to simple cartesian geometry, i.e. coord
must be one dimensional.

* **Parameters:**
  * **coord** (`Hashable`) – The coordinate to be used to compute the gradient.
  * **edge_order** (`{1, 2}`, *default*: `1`) – N-th order accurate differences at the boundaries.
  * **datetime_unit** ([`None`](https://docs.python.org/3/builtins/constants.html#None) or `{"W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as", None}`, *default*: [`None`](https://docs.python.org/3/builtins/constants.html#None)) – Unit to compute gradient. Only valid for datetime coordinate.
* **Returns:**
  **differentiated** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset))

#### SEE ALSO
[`numpy.gradient`](https://numpy.org/doc/stable/reference/generated/numpy.gradient.html#numpy.gradient)
: corresponding numpy function
