I tried several times, but I couldn't find the error. This is the error I've been having...
Asked
Active
Viewed 972 times
1 Answers
0
Can you try csv module and see if it will give you the same error?
import csv
with open('Stichprobe.csv', 'r') as file:
my_reader = csv.reader(file, delimiter=',')
for row in my_reader:
print(row)
Source:
Read a CSV file and perform data analysis without using any libraries like Numpy and Pandas?

Christian Eslabon
- 685
- 4
- 8
-
It still keeps giving me the same result: File "
", line 3 d_data = pd.read_csv('Stichprobe.csv').compute() ^ SyntaxError: invalid character in identifier. – Haoyang Sun Jul 05 '20 at 12:07 -
Normally, this kind of error happens when you have extract parenthesis somewhere. Example: d_data = pd.read_csv('Stichprobe.csv'))). Have you tried restarting the python kernel or better yet restarting your computer? – Christian Eslabon Jul 05 '20 at 12:13
-
By your suggestion, I just restarted my computer. Nevertheless, still the same error. – Haoyang Sun Jul 05 '20 at 12:21
-
is this the first time that you are using pd.read_csv? Can you run this code to see what is the python version you are using? — from sys import version print(f"sys.version: {version}") – Christian Eslabon Jul 05 '20 at 12:34
-
yes, this is the first time that I use pd.reas_csv. This is my python version : sys.version: 3.7.4 – Haoyang Sun Jul 05 '20 at 12:39
-
Sorry, I'm think I'm unable to help you in this question. – Christian Eslabon Jul 05 '20 at 12:58