What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-12 00:46:12
Qwiklabs Assessment: Working with Regular Expressions
#!/usr/bin/env python3 import re import csv def contains_domain(address, domain): """Returns True if the email address contains the given,domain,in the domain position, false if not.""" domain = r'[\w\.-]+@'+domain+'$' ... Add solution -
Python 2021-09-18 14:05:03
python csv update row
from tempfile import NamedTemporaryFile import shutil import csv filename = 'my.csv' tempfile = NamedTemporaryFile(mode='w', delete=False) fields = ['ID', 'Name', 'Course', 'Year'] with open(filename, 'r') as csvfile, tempfile: reader = csv.DictRea... Add solution -
Python 2021-09-06 18:42:01
how to append data to csv file in python without replacing the already present text
import csv row =['Eric', '60'] with open('people.csv','a') as csvFile: #a to append to existing csv file writer = csv.writer(csvFile) csvFile.write("\n") #write your data to new line writer.writerow(row) csvFile.close() Add solution -
Python 2021-09-02 14:39:02
python csv writer row by row
# This action requires the 'csv' module import csv # The basic usage is to first define the rows of the csv file: row_list = [["SN", "Name", "Contribution"], [1, "Linus Torvalds", "Linux Kernel&qu... Add solution -
Python 2021-08-29 22:38:02
convert a text file data to dataframe in python without pandas
import csv with open('log.txt', 'r') as in_file: stripped = (line.strip() for line in in_file) lines = (line.split(",") for line in stripped if line) with open('log.csv', 'w') as out_file: writer = csv.writer(out_file) ... Add solution
Best helpers
Blank
+5
Grin
+5
Hwsolutions
+5
Charlemagne
+5
SYJ
+5
A. Pelicker
+5
KMC
+5
Jonjie
+5
37Bons
+5
Highlightman
+5
ElDynamite
+5
Paul Knight
+5
Karl
+5
WYSIWYG
+5
Required
+5
Saylestyler
+5
Deverejones
+5
Zkanoca
+5
Frank Jaeger
+5