0
import pandas as pd

df = pd.read_csv("C:\Users\VIJAY\Desktop\coursera_AI")

When I use pandas in Python to open a csv file it's showing

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

Can someone help me to figure out the error please?

Mr. T
  • 11,960
  • 10
  • 32
  • 54
vijay MV
  • 75
  • 3
  • 10
  • 1
    Welcome to StackOverflow. Please read [How to ask](https://stackoverflow.com/help/how-to-ask), and post a [Minimal, Complete, Verifiable Example](https://stackoverflow.com/help/mcve). – Jeff Learman Jun 04 '18 at 18:09
  • Check out https://stackoverflow.com/questions/1347791/unicode-error-unicodeescape-codec-cant-decode-bytes-cannot-open-text-file. Basically, try `C:\\Users\\VIJAY\\Desktop\\coursera_AI` – phi Jun 04 '18 at 19:03
  • For the code data = pd.read_csv("C:\\Users\\VIJAY\\Desktop\\for_correlation.csv"). Im getting this error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 26: invalid start byte. Whats wrong with this code – vijay MV Jun 19 '18 at 10:55

0 Answers0