Question regarding how replace! works:

Likely you read your data in with CSV, which uses these things called InlineStrings (as opposed to regular Julia strings) for better performance.

There are a couple of possible fixes. First, you could just stop trying to use the in-place version of replace! and go with simply replace.(). Alternatively, you can search the CSV.jl docs which I’m almost certain will tell you about a keyword argument allowing you to read the strings in as regular strings. EDIT: It is called stringtype, so stringtype=String would work.