Skip to content

Instantly share code, notes, and snippets.

@mbeltagy
Created February 10, 2019 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbeltagy/fff91742f98da3a46f02ba9aa074fcef to your computer and use it in GitHub Desktop.
Save mbeltagy/fff91742f98da3a46f02ba9aa074fcef to your computer and use it in GitHub Desktop.
Building Expenses Filtration
using CSV
data=CSV.read("Jan19.csv")
# The occursin is used to get the line where the transfer happened...hence summing all transfers
audi_ind=findall(x->ismissing(x) ? false : occursin(r"audi"i,x), data[:,1])
data[audi_ind,1:3][:Cash] |> x-> prod.(split.(x,',')) |> x-> Meta.parse.(x) |> sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment