Skip to content

Commit

Permalink
Optional columns to be ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnectedSystems committed Dec 1, 2024
1 parent c98042b commit de8af1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Climate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,13 @@ Base.length(climate::Climate) = nrow(climate.climate_data)
Base.show(io::IO, ::MIME"text/plain", c::Climate) = show(io, c)
function Base.show(io::IO, c::Climate)
ntype_name = nameof(typeof(c))
tgt_col_names = names(c.climate_data[:, Not("year", "month", "day", "Date")])

col_names = names(c.climate_data)

dt_cols = ["year", "month", "day", "Date"]
ignore_cols = dt_cols[[in(t, col_names) for t in dt_cols]]
tgt_col_names = names(c.climate_data[:, Not(ignore_cols...)])

P_cols = occursin.(c.rainfall_id, col_names)
ET_cols = occursin.(c.et_id, col_names)
T_cols = occursin.("_T", col_names)
Expand Down

0 comments on commit de8af1f

Please sign in to comment.