From a21eef25041889c8dbed544479a910239bec80ef Mon Sep 17 00:00:00 2001 From: quinnj Date: Thu, 2 Nov 2017 08:13:48 -0600 Subject: [PATCH] Remove include_string call --- src/subdataframe/subdataframe.jl | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/subdataframe/subdataframe.jl b/src/subdataframe/subdataframe.jl index 5436fc7e0b..75a6481bf2 100644 --- a/src/subdataframe/subdataframe.jl +++ b/src/subdataframe/subdataframe.jl @@ -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