I have been on the R side for some years. I don't do any hardcore statistics, but rather use R as a sophisticated 'csv-files' manipulater. nevertheless, i do need to process a huge amout of data, in a distributed way.
I found that R is not fast enough for my application anymore and I am now investigating other languages.
the first choice is Python-pandas, which is faster. Also, I read that Ocaml could be 10x faster than python, which sounds very attractive to me.
However, i found that the standard libraries of Ocaml seems to be quite low-level. I cannot find any high-level containers like R's data frame.
How do you guys represent data frames in Ocaml? do you use a list of tuples? can anyone share a bit knowledge here?
thanks!
I had to google for data frames in R, not being familiar with R, but it seems like you're looking for records, or perhaps a list of records. Or as you suggest, maybe a list of tuples would have similar properties to R data frames if you add some functions to access the data in the tuples more easily. But I think records would be closer as you can refer to the name of a field in the record.
See the chapter on Records in Real World OCaml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With