SciRuby/daru

NoMethodError: undefined method `scan' for DateTime

bruzos opened this issue · 1 comments

Hi working with Dataframe and DateIndex as main index for it. When I try to convert a vector to a hash with .to_h I am getting the following error:

2.4.4 :004 > data[:close]
 => #<Daru::Vector(300)>
                                     close
 2018-09-17 01:59:59              0.008787
 2018-09-16 01:59:59              0.008655
 2018-09-15 01:59:59              0.008674
 2018-09-14 01:59:59              0.008394
 2018-09-13 01:59:59              0.008161
 2018-09-12 01:59:59              0.008262
 2018-09-11 01:59:59               0.00862
 2018-09-10 01:59:59               0.00876
 2018-09-09 01:59:59               0.00858
 2018-09-08 01:59:59              0.008684
 2018-09-07 01:59:59              0.008837
 2018-09-06 01:59:59              0.008606
 2018-09-05 01:59:59              0.009185
 2018-09-04 01:59:59                 0.009
 2018-09-03 01:59:59              0.009072
                  ...                  ...
2.4.4 :005 > data[:close].to_h
NoMethodError: undefined method `scan' for 2018-09-17 01:59:59 +0200:Time
	from (irb):5

@bruzos , can you please paste all the related sample code. Means what is data vector.