Question: How to make a table from a csv file without using prettytable or pandas. I have to use format I'm trying to... I'm trying to
How to make a table from a csv file without using prettytable or pandas. I have to use format I'm trying to...
I'm trying to get a column for "Type", "Total", and "Percent" from TipJoke.csv file.
import csv with open('TipJoke.csv', newline='') as csv_file: filereader = csv.reader(csv_file, delimiter=' ') for row in filereader: print( '{:2} {:3} {:4}'.format('Type', 'Total', 'Percent')) print(', '.join(row))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
