I get an error when import the “fraud_data.csv” data file in Module 2.
File “”, line 1
fraud_data = pd.read_csv(“C:\Users\Chris-Admin\Desktop\fraud_dat.txt”)
^
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
When I run info() I get the following output, only 183 rows and 274 cols are imported:
<class ‘pandas.core.frame.DataFrame’>
RangeIndex: 183 entries, 0 to 182
Columns: 274 entries, @font-face{font-family:‘Roboto’;font-style:italic;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1Mu51xIIzc.ttf)format(‘truetype’);}@font-face{font-family:‘Roboto’;font-style:normal;font-weight:300;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc9.ttf)format(‘truetype’);}@font-face{font-family:‘Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf)format(‘truetype’);}@font-face{font-family:‘Roboto’;font-style:normal;font-weight:700;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc9.ttf)format(‘truetype’);}fraud_data.csv - Google Drive<link rel=“stylesheet” href="https://fonts.googleapis.com/css?family=Google+Sans:300 to [0]
dtypes: float64(72), object(202)
memory usage: 247.4+ KB
Head() includes the following headings:
@font-face{font-family:'Roboto';font-style:italic;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1Mu51xIIzc.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc9.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf)format('truetype');}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;src:url(//fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmWUlfBBc9.ttf)format('truetype');}fraud_data.csv - Google Drive<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Google+Sans:300 4 <p>I tried several ways to import file including i. directly from google drive link, ii. downloading file to my desktop and importing iii. I looked at the data in Kaggle but it exists as 5 separate data files. I looked at the file in Notepad and everything looks fine, it was utf-8 encoded.</p> <p>Not sure what else could cause the error. Please help.</p>