Skip to content

Commit

Permalink
Add inline example for select
Browse files Browse the repository at this point in the history
Addresses #1686
  • Loading branch information
michaelgrund authored Feb 13, 2022
1 parent 17105a3 commit 0404c25
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pygmt/src/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ def select(data=None, outfile=None, **kwargs):
- :class:`pandas.DataFrame` table if ``outfile`` is not set.
- None if ``outfile`` is set (filtered output will be stored in file
set by ``outfile``).
Example
-------
>>> import pygmt # doctest: +SKIP
>>> # Load a table of ship observations of bathymetry off Baja California
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
>>> # Only return the data points that lie within the region between
... longitudes 246 and 247 and latitudes 20 and 21
>>> pygmt.select(data=ship_data, region=[246,247,20,21])
... ) # doctest: +SKIP
"""

with GMTTempFile(suffix=".csv") as tmpfile:
Expand Down

0 comments on commit 0404c25

Please sign in to comment.