How to Call a DataFrame without String7, String15 in Julia
Error
When using data frames in Julia, string data sometimes get read as String7
, String15
, String31
, etc., causing various errors. Rather than specific errors occurring, the usual functions don’t work with these, causing all sorts of problems.
Cause
For performance reasons, String
was changed to faster versions like String7
, etc. It’s designed this way on purpose, so nothing much can be done about it.
Solution
Passing the option stringtype = String
to CSV.read()
works.
It’s actually quite inconvenient, but you’ll have to deal with it.
Environment
- OS: Windows
- julia: v1.8.5