【发布时间】:2021-09-30 15:19:48
【问题描述】:
#Readline 函数不打印 CSV 文件的 heders
#代码
path_TI = 'tips.csv'
with open(path_TI) as f:
for i in f:
print(f.readline())
#输出
16.99,1.01,Female,No,Sun,Dinner,2
21.01,3.5,男,No,Sun,Dinner,3
24.59,3.61,Female,No,Sun,Dinner,4
8.77,2.0,Male,No,Sun,Dinner,2
...
【问题讨论】:
标签: python csv for-loop readline