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

The cause of the problem: the \ anti-underline in python has the meaning of escape

 

Solution: Method one, add two \\ to the path 

                  Method two, data = pd.read_csv(r"C:\Users\79178\Desktop\Graduation Project\sample_submission.csv")

                   Adding r before the path means that the following path is not escaped. 

Guess you like

Origin blog.csdn.net/Growing_hacker/article/details/104448406