Convert string and int64 into date type in Julia

Viewed 261

I am trying to convert String and Int64 column types into date type Julia. I tried a number of ways like Dates(). What's the best way to do this by column?

 10×2 DataFrame
 Row │ stock_date   price   
     │ String      Float64 
─────┼─────────────────────
   1 │ Jan 1 2000    39.81
   2 │ Feb 1 2000    36.35
   3 │ Mar 1 2000    43.22
   4 │ Apr 1 2000    28.37
   5 │ May 1 2000    25.45
   6 │ Jun 1 2000    32.54
   7 │ Jul 1 2000    28.4
   8 │ Aug 1 2000    28.4
   9 │ Sep 1 2000    24.53
  10 │ Oct 1 2000    28.02

 10×2 DataFrame
 Row │ Year   ma_value 
     │ Int64  Float64  
─────┼─────────────────
   1 │  1960   12.9945
   2 │  1961   12.4031
   3 │  1962   13.943
   4 │  1963   13.0059
   5 │  1964   14.9382
   6 │  1965   13.2202
   7 │  1966   12.9324
   8 │  1967   12.8837
   9 │  1968   12.2977
  10 │  1969   11.9549
1 Answers
Related