“Python编程”版本间的差异
来自iCenter Wiki
(→python语言) |
(→python语言) |
||
第3行: | 第3行: | ||
文件读取:csv(pandas库),图片(pilllow库),其他(字符串处理) | 文件读取:csv(pandas库),图片(pilllow库),其他(字符串处理) | ||
− | + | ==Pandas库使用== | |
+ | |||
+ | #/usr/bin/python | ||
+ | # -*- coding: utf-8 -*- | ||
import pandas as np | import pandas as np | ||
import sys | import sys | ||
第12行: | 第15行: | ||
df.to_csv("%d.csv" %x, columns=[x], header=True, index=False) | df.to_csv("%d.csv" %x, columns=[x], header=True, index=False) | ||
+ | ==Numpy库使用== | ||
+ | Numpy数据操作:基本操作(dtype,reshape,transpose),数据切分(下标访问,random.sample等等) | ||
− | + | ==TensorFlow== | |
− | + | 神经网络搭建: | |
==小作业== | ==小作业== |
2017年5月27日 (六) 10:32的版本
python语言
文件读取:csv(pandas库),图片(pilllow库),其他(字符串处理)
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)
Numpy库使用
Numpy数据操作:基本操作(dtype,reshape,transpose),数据切分(下标访问,random.sample等等)
TensorFlow
神经网络搭建:
小作业
从头开始mnist识别训练
参考书
- Lutz, Mark. Learning python. " O'Reilly Media, Inc.", 2013.