Skip to content

Commit f9fb29e

Browse files
authored
fix ragged docs (#304)
1 parent 9d14210 commit f9fb29e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clouddrift/ragged.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,18 +580,23 @@ def subset(
580580
Criteria are combined on any data or metadata variables part of the Dataset. The following examples are based on the GDP dataset.
581581
582582
Retrieve a region, like the Gulf of Mexico, using ranges of latitude and longitude:
583+
583584
>>> subset(ds, {"lat": (21, 31), "lon": (-98, -78)})
584585
585586
Retrieve drogued trajectory segments:
587+
586588
>>> subset(ds, {"drogue_status": True})
587589
588590
Retrieve trajectory segments with temperature higher than 25°C (303.15K):
591+
589592
>>> subset(ds, {"sst": (303.15, np.inf)})
590593
591594
Retrieve specific drifters from their IDs:
595+
592596
>>> subset(ds, {"ID": [2578, 2582, 2583]})
593597
594598
Retrieve a specific time period:
599+
595600
>>> subset(ds, {"time": (np.datetime64("2000-01-01"), np.datetime64("2020-01-31"))})
596601
597602
Note that to subset time variable, the range has to be defined as a function
@@ -600,6 +605,7 @@ def subset(
600605
``pd.Timestamp``, the range would have to be defined accordingly.
601606
602607
Those criteria can also be combined:
608+
603609
>>> subset(ds, {"lat": (21, 31), "lon": (-98, -78), "drogue_status": True, "sst": (303.15, np.inf), "time": (np.datetime64("2000-01-01"), np.datetime64("2020-01-31"))})
604610
605611
Raises

0 commit comments

Comments
 (0)