Skip to content

Commit

Permalink
Replace use of values as a variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Mar 13, 2015
1 parent 8de3e58 commit 664bd6a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ExcelReaders.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ function readxl(::Type{DataFrame}, file::ExcelFile, sheetname::String, startrow:

for i=1:ncol
if header
values = data[2:end,i]
vals = data[2:end,i]
else
values = data[:,i]
vals = data[:,i]
end

# Check whether all non-NA values in this column
Expand All @@ -154,7 +154,7 @@ function readxl(::Type{DataFrame}, file::ExcelFile, sheetname::String, startrow:
found_first_type = false
type_of_el = Any
NAs_present = false
for val=values
for val=vals
if !found_first_type
if !isna(val)
type_of_el = typeof(val)
Expand All @@ -178,18 +178,18 @@ function readxl(::Type{DataFrame}, file::ExcelFile, sheetname::String, startrow:
if NAs_present
# TODO use the following line instead of the shim once upstream
# bug is fixed
#columns[i] = convert(DataArray{type_of_el},values)
shim_newarray = DataArray(type_of_el, length(values))
for l=1:length(values)
shim_newarray[l] = values[l]
#columns[i] = convert(DataArray{type_of_el},vals)
shim_newarray = DataArray(type_of_el, length(vals))
for l=1:length(vals)
shim_newarray[l] = vals[l]
end
columns[i] = shim_newarray
else
# TODO Decide whether this should be converted to Array instead of DataArray
columns[i] = convert(DataArray{type_of_el},values)
columns[i] = convert(DataArray{type_of_el},vals)
end
else
columns[i] = values
columns[i] = vals
end
end

Expand Down

0 comments on commit 664bd6a

Please sign in to comment.