摘要: Attributes of numpy.ndarray: numpy.ndarray.shape: Dimensions (height, width, ...) numpy.ndarray.ndim: No. of dimensions = len(shape) numpy.ndarray.siz 阅读全文
posted @ 2017-12-17 23:38 Zhentiw 阅读(229) 评论(0) 推荐(0)
摘要: import numpy as np def test_run(): data=np.random.random((3,4)) """ [[ 0.80150549 0.96756513 0.18914514 0.85937016] [ 0.23563908 0.75685996 0.46804508 0.91735016] [ 0.7054... 阅读全文
posted @ 2017-12-17 23:30 Zhentiw 阅读(286) 评论(0) 推荐(0)
摘要: It is easy to compare the data by normalize it. 阅读全文
posted @ 2017-12-17 23:02 Zhentiw 阅读(1859) 评论(0) 推荐(0)
摘要: import os import pandas as pd import matplotlib.pyplot as plt def test_run(): start_date='2017-01-01' end_data='2017-12-15' dates=pd.date_range(start_ 阅读全文
posted @ 2017-12-17 22:47 Zhentiw 阅读(457) 评论(0) 推荐(0)
摘要: For example we have dataframe like this: Now we only we want to get highlighted part: We can use Dataframe.ix[] method to get date related index data 阅读全文
posted @ 2017-12-17 22:35 Zhentiw 阅读(320) 评论(0) 推荐(0)
摘要: Create an empty Data frame with date index: Now we want to load SPY.csv and get 'Adj Close' column value and copy the range (11-21, 11-28) data to the 阅读全文
posted @ 2017-12-17 02:12 Zhentiw 阅读(778) 评论(0) 推荐(0)