drop_coords

function of dascore.proc.coords source

drop_coords(
    self ,
    *coords: str | collections.abc.Iterable[str, collections.abc.Iterable[str]] ,
)-> ‘Self’

Drop one or more non-dimensional coordinates.

Parameters

Parameter Description
*coords One or more coordinates to drop. Each can be a coordinate name or
a sequence of them.

Examples

import numpy as np
import dascore as dc
pa = dc.get_example_patch("random_patch_with_lat_lon")
# Drop non-dimensional coordinate latitude
pa_no_lat = pa.drop_coords("latitude")
# A sequence of names works as well.
pa_no_lat = pa.drop_coords(["latitude"])