Pandas 示例

来自iCenter Wiki
2019年7月12日 (五) 04:19Zhenchen讨论 | 贡献的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
#/usr/bin/python
# -*- coding: utf-8 -*-
import pandas as np
import sys
df = np.read_csv("traffic.txt", header=None)
for x in range(0,10):
	df.to_csv("%d.csv" %x, columns=[x], header=True, index=False)