You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I want to read and write an Arabic CSV file using pandas in python3,6 so this is the code
-- coding :utf8 --
import pandas as pd
#import sys
df = pd.read_csv("C:\Users\DELL\Desktop\test_model.csv", encoding = 'utf-8')
print(df)
i got this error when i ran the module :
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
RESTART: C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\read_csv.py
Traceback (most recent call last):
File "pandas_libs\parsers.pyx", line 1134, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas_libs\parsers.pyx", line 1240, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas_libs\parsers.pyx", line 1256, in pandas._libs.parsers.TextReader._string_convert
File "pandas_libs\parsers.pyx", line 1494, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\read_csv.py", line 4, in
df = pd.read_csv("C:\Users\DELL\Desktop\test_model.csv", encoding = 'utf-8')
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 446, in _read
data = parser.read(nrows)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 1036, in read
ret = self._engine.read(nrows)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 1848, in read
data = self._reader.read(nrows)
File "pandas_libs\parsers.pyx", line 876, in pandas._libs.parsers.TextReader.read
File "pandas_libs\parsers.pyx", line 891, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas_libs\parsers.pyx", line 968, in pandas._libs.parsers.TextReader._read_rows
File "pandas_libs\parsers.pyx", line 1094, in pandas._libs.parsers.TextReader._convert_column_data
File "pandas_libs\parsers.pyx", line 1141, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas_libs\parsers.pyx", line 1240, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas_libs\parsers.pyx", line 1256, in pandas._libs.parsers.TextReader._string_convert
File "pandas_libs\parsers.pyx", line 1494, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
The text was updated successfully, but these errors were encountered:
Hello,
I want to read and write an Arabic CSV file using pandas in python3,6 so this is the code
-- coding :utf8 --
import pandas as pd
#import sys
df = pd.read_csv("C:\Users\DELL\Desktop\test_model.csv", encoding = 'utf-8')
print(df)
i got this error when i ran the module :
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
RESTART: C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\read_csv.py
Traceback (most recent call last):
File "pandas_libs\parsers.pyx", line 1134, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas_libs\parsers.pyx", line 1240, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas_libs\parsers.pyx", line 1256, in pandas._libs.parsers.TextReader._string_convert
File "pandas_libs\parsers.pyx", line 1494, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\read_csv.py", line 4, in
df = pd.read_csv("C:\Users\DELL\Desktop\test_model.csv", encoding = 'utf-8')
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 446, in _read
data = parser.read(nrows)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 1036, in read
ret = self._engine.read(nrows)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\parsers.py", line 1848, in read
data = self._reader.read(nrows)
File "pandas_libs\parsers.pyx", line 876, in pandas._libs.parsers.TextReader.read
File "pandas_libs\parsers.pyx", line 891, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas_libs\parsers.pyx", line 968, in pandas._libs.parsers.TextReader._read_rows
File "pandas_libs\parsers.pyx", line 1094, in pandas._libs.parsers.TextReader._convert_column_data
File "pandas_libs\parsers.pyx", line 1141, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas_libs\parsers.pyx", line 1240, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas_libs\parsers.pyx", line 1256, in pandas._libs.parsers.TextReader._string_convert
File "pandas_libs\parsers.pyx", line 1494, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
The text was updated successfully, but these errors were encountered: