我有一个非常大的数据帧,包含150000行和1000列。一个子集如下:
df <- data.frame(col1 = c('201507', '201508', '201509', '201510', '201511', '201512', '201601', '201602', '201603'),
col2 = c(12, 45, 6, 23, 17, 32, 67, 23, 12),
col3 = c(0, 0, 12, 0, 67, 34, 87, 19, 9),
col4 = c(4584, 3423, 6723, 1245, 3234, 14577, 213, 557, 5677),
col5 = c(134, 345, 0, 23, 93, 48, 12, 21, 0))
我想删除任何列:
col3
和col5
)我知道这是一个简单的例子,但我有1000列