Skip to content

Commit 9fff18c

Browse files
Optional columns to be ignored
1 parent 9c19e8c commit 9fff18c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Climate.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,13 @@ Base.length(climate::Climate) = nrow(climate.climate_data)
176176
Base.show(io::IO, ::MIME"text/plain", c::Climate) = show(io, c)
177177
function Base.show(io::IO, c::Climate)
178178
ntype_name = nameof(typeof(c))
179-
tgt_col_names = names(c.climate_data[:, Not("year", "month", "day", "Date")])
180179

181180
col_names = names(c.climate_data)
181+
182+
dt_cols = ["year", "month", "day", "Date"]
183+
ignore_cols = dt_cols[[in(t, col_names) for t in dt_cols]]
184+
tgt_col_names = names(c.climate_data[:, Not(ignore_cols...)])
185+
182186
P_cols = occursin.(c.rainfall_id, col_names)
183187
ET_cols = occursin.(c.et_id, col_names)
184188
T_cols = occursin.("_T", col_names)

0 commit comments

Comments
 (0)