Skip to content

Commit 48ac048

Browse files
committed
Drop 0.5 SubDataFrame definition.
1 parent 2759f6d commit 48ac048

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

src/subdataframe/subdataframe.jl

+11-31
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,19 @@
55
##
66
##############################################################################
77

8-
if VERSION >= v"0.6.0-dev.2643"
9-
include_string("""
10-
immutable SubDataFrame{T <: AbstractVector{Int}} <: AbstractDataFrame
11-
parent::DataFrame
12-
rows::T # maps from subdf row indexes to parent row indexes
13-
14-
function SubDataFrame{T}(parent::DataFrame, rows::T) where {T <: AbstractVector{Int}}
15-
if length(rows) > 0
16-
rmin, rmax = extrema(rows)
17-
if rmin < 1 || rmax > size(parent, 1)
18-
throw(BoundsError())
19-
end
20-
end
21-
new(parent, rows)
22-
end
23-
end
24-
""")
25-
else
26-
@eval begin
27-
immutable SubDataFrame{T <: AbstractVector{Int}} <: AbstractDataFrame
28-
parent::DataFrame
29-
rows::T # maps from subdf row indexes to parent row indexes
30-
31-
function SubDataFrame(parent::DataFrame, rows::T)
32-
if length(rows) > 0
33-
rmin, rmax = extrema(rows)
34-
if rmin < 1 || rmax > size(parent, 1)
35-
throw(BoundsError())
36-
end
37-
end
38-
new(parent, rows)
8+
9+
immutable SubDataFrame{T <: AbstractVector{Int}} <: AbstractDataFrame
10+
parent::DataFrame
11+
rows::T # maps from subdf row indexes to parent row indexes
12+
13+
function SubDataFrame{T}(parent::DataFrame, rows::T) where {T <: AbstractVector{Int}}
14+
if length(rows) > 0
15+
rmin, rmax = extrema(rows)
16+
if rmin < 1 || rmax > size(parent, 1)
17+
throw(BoundsError())
3918
end
4019
end
20+
new(parent, rows)
4121
end
4222
end
4323

0 commit comments

Comments
 (0)