I’m trying to edit a DataFrame, my objective is to keep the columns in which at least one value is <=0.
For example, using the code
using DataFrames
data = Dict("A"=>[1,7,2],
"B"=>[3,-9,-3],
"C"=>[3,0,6],
"D"=>[8,4,2],
"E"=>[4,3,-4])
df = DataFrame(data)
I get the following result
And I’m trying to transform it into the following DataFrame
There are some options to remove rows based on conditions, but I haven’t found any that does the same to columns.
Does anyone know how to do this in a simple way?