Predictive Hacks

How to remove the ï.. appear in the first column in read.csv in R

Have you ever encountered this annoying symbol called BOM (ï..) in the first column of your data frame after you read a csv file?

This is a common pattern for files generated from Excel. The solution for this problem is to add the fileEncoding="UTF-8-BOM" in the read.csv command as follows:

df <- read.csv("myfile.csv", fileEncoding="UTF-8-BOM")

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore


Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.


Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s