Occurs when reading a file with the wrong encoding.
import pandas as pd
df = pd.read_csv("data_utf16.csv")
print(df.head())UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
import pandas as pd
df = pd.read_csv("data_utf16.csv", encoding="utf-16")
print(df.head())Assumed default encoding would work, but file was saved as utf-16. Spent time checking the data structure before identifying the encoding issue.