Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Commit

Permalink
📝 update DataFrames documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldansereau committed Jun 2, 2021
1 parent 1baea79 commit 89beeaf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/src/examples/dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using Statistics
using DataFrames
# Load environmental data
temperature, precipitation = worldclim([1,12])
temperature, precipitation = SimpleSDMPredictor(WorldClim, BioClim, [1,12])
# Get GBIF occurrences
kingfisher = GBIF.taxon("Megaceryle alcyon", strict=true)
Expand Down Expand Up @@ -59,11 +59,12 @@ rename!(env_df, :x1 => :temperature, :x2 => :precipitation)
first(env_df, 5)
```

Note that the resulting `DataFrame` will include the values set to `nothing` in
the layers. We might want to remove those rows using `filter!`:
Note that the resulting `DataFrame` will include `missing` values for the
elements set to `nothing` in the layers. We might want to remove those rows
using `filter!` or `dropmissing!`:

```@example dataframes
filter!(x -> !isnothing(x.temperature) && !isnothing(x.precipitation), env_df);
dropmissing!(env_df, [:temperature, :precipitation]);
last(env_df, 5)
```

Expand Down

0 comments on commit 89beeaf

Please sign in to comment.