Apr-24-2021, 05:51 PM
Need to write information into csv and then transfer this information to HTML file.
|
code for CSV file to html file without pandas
|
|
Apr-24-2021, 05:51 PM
Need to write information into csv and then transfer this information to HTML file.
Apr-24-2021, 09:41 PM
There are many other libraries PyPi this if don't want to use Pandas eg CSVtoTable
If doing as training i can write a start example of one way it could be done. import csv
with open("test.csv") as csvfile:
reader = csv.DictReader(csvfile, delimiter=",")
for row in reader:
print("<tr>")
td = '<td>'
for fn in reader.fieldnames:
print(f"{td:>6}{row[fn]}</td>")
print("</tr>")
|
|
|