Skip to content

Commit 0cbc2af

Browse files
committed
Add README
1 parent d3b45ae commit 0cbc2af

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# cf-xarray
1+
# cf-xarray
2+
3+
4+
A lightweight convenience wrapper for using CF attributes on xarray objects. Right now all of this works:
5+
6+
```
7+
import cf_xarray
8+
9+
ds = xr.tutorial.load_dataset("air_temperature").isel(time=slice(4))
10+
11+
ds.air.cf.var("X")
12+
13+
ds.air.cf.resample(T="M").var("X")
14+
15+
(
16+
ds.air
17+
.cf.isel(T=slice(4))
18+
.cf.plot.contourf(x="Y", y="X", col="T", col_wrap=4)
19+
)
20+
21+
ds.air.isel(lat=[0, 1], lon=1).cf.plot.line(x="T", hue="Y")
22+
```

0 commit comments

Comments
 (0)