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
Traceback (most recent call last):
File "/Users/mardirousi/Desktop/Python/Ch 9/csv/csv.py", line 1, in
import csv
File "/Users/mardirousi/Desktop/Python/Ch 9/csv/csv.py", line 5, in
write = csv.writer(f, delimiter=",")
AttributeError: module 'csv' has no attribute 'writer'
The text was updated successfully, but these errors were encountered:
I was having the same issue and found that if all the files were placed into the same folder as this python file, on my pc this worked. Windows 10 version. I was able to open a cvs file named "Grocery inventory.csv" and txt file named "file.txt".
chapter 9 exercise 1
import os
os.path.join("Users",
"gr8-g",
"Grocery inventory.csv")
import csv
with open("Grocery inventory.csv", "r", newline='') as f:
r = csv.reader(f, delimiter=",")
for row in r:
print(",".join(row))
http://tinyurl.com/go9wepf
I get this error when running the code.
Traceback (most recent call last):
File "/Users/mardirousi/Desktop/Python/Ch 9/csv/csv.py", line 1, in
import csv
File "/Users/mardirousi/Desktop/Python/Ch 9/csv/csv.py", line 5, in
write = csv.writer(f, delimiter=",")
AttributeError: module 'csv' has no attribute 'writer'
The text was updated successfully, but these errors were encountered: