使用带液没python自带的csv模蠢纳块
import csv
csv_reader = csv.reader(open('data.file', encoding='utf-8'))
for row in csv_reader:
print(row)
使用pandas读埋橘取csv文件
import pandas as pd
data = pd.read_csv('data.csv')
print(data)
import csv
with open('eggs.csv', newline='') as csvfile:
段凯spamreader = csv.reader(csvfile, delimiter=',', quotechar=',')
告大 for row 握友唤in spamreader:
print(', '.join(row))