SciRuby / daru

Data Analysis in RUby
BSD 2-Clause "Simplified" License
1.04k stars 139 forks source link

Better error messages when a vector is missing from dataframe #335

Closed sivagollapalli closed 7 years ago

sivagollapalli commented 7 years ago

204

v0dro commented 7 years ago

@sivagollapalli you've made changes to index.rb and are displaying an error message only for Dataframes with missing vectors. However, an Index is used by both Vector and DataFrame and therefore returning an error message stating a vector is missing from index.rb is not justified.

If you want better error reporting, you should catch the IndexError in the DataFrame class and change the error message to reflect the fact that a vector is missing from a dataframe.

sivagollapalli commented 7 years ago

@v0dro @zverok Could you check the changes?

zverok commented 7 years ago

Please fix Rubocop (https://travis-ci.org/SciRuby/daru/jobs/225581190, you can check it locally by running rubocop command) before merge.