Pandas 示例

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

跳转至: 导航搜索

Pandas使用实例

#/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)