SciRuby / daru

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

Adds option to display all data on inspect #476

Closed paisible-wanderer closed 5 years ago

paisible-wanderer commented 5 years ago

Hello,

By default, using inspect on dataframe/vector/other will not display the whole data.

I have added an option that I think can be useful.

vect = Daru::Vector.new((1..16))

# before
vect
# => #<Daru::Vector(16)>
#    0   1
#    1   2
#    2   3
#    3   4
#    4   5
#    5   6
#    6   7
#    7   8
#    8   9
#    9  10
#   10  11
#   11  12
#   12  13
#   13  14
#   14  15
#  ... ...

# after
puts vect.inspect(all: true);nil
# #<Daru::Vector(16)>
#    0   1
#    1   2
#    2   3
#    3   4
#    4   5
#    5   6
#    6   7
#    7   8
#    8   9
#    9  10
#   10  11
#   11  12
#   12  13
#   13  14
#   14  15
#   15  16
# => nil

Let me know if there is an better way, or any improvement I can make to this PR.

Shekharrajak commented 5 years ago

Closing after this comment : https://github.com/SciRuby/daru/pull/476#discussion_r252701460