Commit 48ac048 1 parent 2759f6d commit 48ac048 Copy full SHA for 48ac048
File tree 1 file changed +11
-31
lines changed
1 file changed +11
-31
lines changed Original file line number Diff line number Diff line change 5
5
# #
6
6
# #############################################################################
7
7
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 ())
39
18
end
40
19
end
20
+ new (parent, rows)
41
21
end
42
22
end
43
23
You can’t perform that action at this time.
0 commit comments