python读写csv文件
2012-07-16 15:55
344 查看
python读写csv文件
报表文件
文件中的数据是以','分隔 阅读更多
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import csv
def writer ():
aa = csv.writer(file('z.csv', 'wb'))
aa.writerow(['c1', 'c2', 'c3'])
lines = [range(3) for i in range(5)]
for a in lines:
aa.writerow(a)
def reader ():
bb = csv.reader(file('z.csv', 'rb'))
for b in bb:
print b
if __name__ == '__main__':
writer()
reader()
报表文件
文件中的数据是以','分隔 阅读更多
相关文章推荐
- Python: 对CSV文件读写 和 Md5加密
- Python读写csv文件
- Python——csv txt文件读写
- Python 3.x读写csv文件中数字的方法示例
- python 读写csv文件(一)
- Python实现的简单读写csv文件操作示例
- 「Python」python读写csv文件并增加行列
- Python读写csv文件
- python使用csv模块读写csv文件
- python 读写CSV文件
- Python文件读写(csv、excel)
- Python 标准库 csv —— csv 文件的读写
- Python读写csv文件
- Python读写csv文件
- Python读写CSV文件
- Python对csv文件的读写
- python数据分析之(4)读写数据文件CSV,EXCEL等
- python读写csv文件
- python之读写csv文件
- python读写csv文件的心得(随笔一:简单的读写csv文件)