Skip to content

Commit

Permalink
Merge pull request #1271 from JuliaData/jq/removeincludestring
Browse files Browse the repository at this point in the history
Remove include_string call
  • Loading branch information
quinnj committed Nov 2, 2017
2 parents 30ab24e + a21eef2 commit 9d0e065
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/subdataframe/subdataframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
##
##############################################################################

include_string("""
immutable SubDataFrame{T <: AbstractVector{Int}} <: AbstractDataFrame
parent::DataFrame
rows::T # maps from subdf row indexes to parent row indexes
function SubDataFrame{T}(parent::DataFrame, rows::T) where {T <: AbstractVector{Int}}
if length(rows) > 0
rmin, rmax = extrema(rows)
if rmin < 1 || rmax > size(parent, 1)
throw(BoundsError())
end
end
new(parent, rows)
struct SubDataFrame{T <: AbstractVector{Int}} <: AbstractDataFrame
parent::DataFrame
rows::T # maps from subdf row indexes to parent row indexes

function SubDataFrame{T}(parent::DataFrame, rows::T) where {T <: AbstractVector{Int}}
if length(rows) > 0
rmin, rmax = extrema(rows)
if rmin < 1 || rmax > size(parent, 1)
throw(BoundsError())
end
end
""")
new(parent, rows)
end
end

"""
A view of row subsets of an AbstractDataFrame
Expand Down

0 comments on commit 9d0e065

Please sign in to comment.