Add inline example for select
@@ -147,6 +147,19 @@ 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"
+ ... ) # doctest: +SKIP
+ >>> # 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:
