Skip to content

Commit

Permalink
Handle unimplemented readtable arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
garborg committed Aug 2, 2014
1 parent 50abb5b commit 9b2cc92
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/dataframe/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ immutable ParseOptions{S <: ByteString}
commentmark::Char
ignorepadding::Bool
skipstart::Int
skiprows::Vector{Int}
skiprows::AbstractVector{Int}
skipblanks::Bool
encoding::Symbol
allowescapes::Bool
Expand Down Expand Up @@ -769,10 +769,16 @@ function readtable(io::IO,
commentmark::Char = '#',
ignorepadding::Bool = true,
skipstart::Integer = 0,
skiprows::Vector{Int} = Int[],
skiprows::AbstractVector{Int} = Int[],
skipblanks::Bool = true,
encoding::Symbol = :utf8,
allowescapes::Bool = false)
if encoding != :utf8
throw(ArgumentError("Argument 'encoding' only supports ':utf8' currently."))
elseif !isempty(skiprows)
throw(ArgumentError("Argument 'skiprows' is not yet supported."))
end

if !isempty(colnames)
warn("Argument 'colnames' is deprecated, please use 'names'.")
if !isempty(names)
Expand Down Expand Up @@ -848,7 +854,7 @@ function readtable(pathname::String;
commentmark::Char = '#',
ignorepadding::Bool = true,
skipstart::Integer = 0,
skiprows::Vector{Int} = Int[],
skiprows::AbstractVector{Int} = Int[],
skipblanks::Bool = true,
encoding::Symbol = :utf8,
allowescapes::Bool = false)
Expand Down

0 comments on commit 9b2cc92

Please sign in to comment.