Skip to content

Commit

Permalink
Use DataFramesMeta.@subset instead of @where
Browse files Browse the repository at this point in the history
  • Loading branch information
gustafsson committed Jul 4, 2022
1 parent 083de40 commit 06eefc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CSV = "0.8 - 0.10"
CodecZlib = "0.7"
ColorSchemes = "3"
DataFrames = "1.2 - 1.3"
DataFramesMeta = "0.7 - 0.11"
DataFramesMeta = "0.8 - 0.11"
Distributions = "0.23, 0.25"
HypothesisTests = "0.10"
Optim = "^1.3"
Expand Down
4 changes: 2 additions & 2 deletions src/datasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function co2(full::Bool = false)
(Dates.isleapyear(x) & (Dates.month(x) == 2)) ? Dates.day(x) != 29 : true
end

@where(co2_sdf, in.(:date, Ref(dates_co2_stl)))
@subset(co2_sdf, in.(:date, Ref(dates_co2_stl)))

end

Expand Down Expand Up @@ -105,7 +105,7 @@ function seaborne(full::Bool = false)
sb_df = open(joinpath(path, "seaborne.csv.gz")) do file
CSV.read(GzipDecompressorStream(file),DataFrame,
dateformat = "mm/dd/yyyy HH:MM:SS pp",
types = Dict(:date => Date))
types = Dict(:year => Date))
end

if full
Expand Down

0 comments on commit 06eefc9

Please sign in to comment.