[ python量化 ]
过去不再从来
反应有点慢
展开
-
python之numpy学习02
# -*- coding: utf-8 -*-"""Created on Sun May 14 21:16:22 2017@author: Administrator"""import numpy as np#numpy ndarray 计算全部元素的和、按行求和,按列求和。a = np.arange(20).reshape(4, 5)print ("a:")print (a)prin原创 2017-05-14 22:31:43 · 393 阅读 · 0 评论 -
python之numpy学习
# -*- coding: utf-8 -*-"""Created on Fri May 12 22:59:30 2017@author: Administrator"""import numpy as npprint (np.version.full_version)#numpy 对象:数组a = np.arange(20)print (a)print (type(a)) # nump原创 2017-05-14 08:59:07 · 369 阅读 · 0 评论 -
pandas练习
pandas10分钟教程 http://pandas.pydata.org/pandas-docs/stable/10min.html# -*- coding: utf-8 -*-"""Created on Fri May 5 23:23:03 2017@author: Administrator"""import pandas as pdimport numpy as npimpor原创 2017-05-07 16:11:04 · 505 阅读 · 0 评论 -
pandas之DataFrame创建
# -*- coding: utf-8 -*-"""Created on Mon May 1 21:18:29 2017@author: you"""import pandas as pdimport numpy as npimport matplotlib.pyplot as plt#########################################s = pd.Ser原创 2017-05-01 23:03:54 · 750 阅读 · 0 评论 -
matplotlib入门-绘制简单折线图
# -*- coding: utf-8 -*-"""Spyder EditorThis is a temporary script file."""import matplotlib.pyplot as pltinput_values = [1, 2, 3, 4, 5]squares = [1, 4, 9, 16, 25]plt.plot(input_values, squares, l原创 2017-05-28 23:38:23 · 1071 阅读 · 0 评论 -
matplotlib-随机漫步
random_walk.py# -*- coding: utf-8 -*-"""Created on Mon May 29 07:56:41 2017@author: Administrator"""# -*- coding: utf-8 -*-"""Created on Mon May 29 07:52:39 2017@author: Administrator"""from rand原创 2017-05-29 08:45:50 · 812 阅读 · 0 评论 -
pygal-直方图
模拟掷骰子die.py # -*- coding: utf-8 -*-"""Created on Mon May 29 09:11:05 2017@author: Administrator"""from random import randintclass Die(): """表示一个骰子的类""" def __init__(self, num_sides=6):原创 2017-05-29 09:50:27 · 2267 阅读 · 0 评论 -
python数据处理(csv->折线图)
highs_lows.py# -*- coding: utf-8 -*-"""Created on Mon May 29 10:00:16 2017@author: Administrator"""import csvfilename = '300001_D.csv'with open(filename) as f: reader = csv.reader(f) heade原创 2017-05-29 11:48:43 · 10147 阅读 · 2 评论