随笔分类 -  Python

摘要:Global Statistics: Common seen methods as such 1. Mean 2. Median 3. Standard deviation: the larger the number means it various a lot. 4. Sum. Rolling 阅读全文
posted @ 2017-12-21 21:30 Zhentiw 阅读(811) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Integer array indexing Boolean array indexing Note: The expression a < mean produces a boolean array, like: 阅读全文
posted @ 2017-12-19 20:06 Zhentiw 阅读(600) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Integer array indexing: Select array elements with another array 阅读全文
posted @ 2017-12-18 21:32 Zhentiw 阅读(249) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Note: Indexing starts at 0 (zero). def slicing(): a = np.random.rand(5,4) print(a) """ [[ 0.15372787 0.83347785 0.86855635 0 阅读全文
posted @ 2017-12-18 21:21 Zhentiw 阅读(213) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Mathematical functions numpy.sum: Sum of elements - along rows, columns or all numpy.min, numpy.max, numpy.mean: Simple statistics Al 阅读全文
posted @ 2017-12-18 21:08 Zhentiw 阅读(171) 评论(0) 推荐(0) 编辑
摘要: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 阅读(223) 评论(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 阅读(280) 评论(0) 推荐(0) 编辑
摘要:It is easy to compare the data by normalize it. 阅读全文
posted @ 2017-12-17 23:02 Zhentiw 阅读(1852) 评论(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 阅读(449) 评论(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 阅读(315) 评论(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 阅读(769) 评论(0) 推荐(0) 编辑
摘要:Install: 阅读全文
posted @ 2017-12-15 20:58 Zhentiw 阅读(355) 评论(0) 推荐(0) 编辑
摘要:Object oriented classes work much like classes in other languages. Learn how to create them and use them, learn the difference between class variables 阅读全文
posted @ 2017-12-13 16:27 Zhentiw 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Misunderstanding scope can cause problems in your application. Watch this lesson to learn how Python scope works and the hidden implications it presen 阅读全文
posted @ 2017-12-13 16:18 Zhentiw 阅读(275) 评论(0) 推荐(0) 编辑
摘要:Exceptions cause your application to crash. Handling them allows you to recover gracefully and keep your application running. Learn how to handle exce 阅读全文
posted @ 2017-12-13 16:08 Zhentiw 阅读(197) 评论(0) 推荐(0) 编辑
摘要:This lesson will teach you how to read the contents of an external file from Python. You will also learn how to use the python csv module to read and 阅读全文
posted @ 2017-12-13 15:59 Zhentiw 阅读(256) 评论(0) 推荐(0) 编辑
摘要:A module is a function extracted to a file. This allows you to import the function and use it in any other code you may write. You’ll learn how to cre 阅读全文
posted @ 2017-12-12 17:19 Zhentiw 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Print statements will get you a long way in monitoring the behavior of your application, but logging will get your further. Learn how to implement log 阅读全文
posted @ 2017-12-11 14:54 Zhentiw 阅读(207) 评论(0) 推荐(0) 编辑
摘要:A set is an unordered collection with no duplicate items in Python. In this lesson, you will learn how to create them, and perform basic operations to 阅读全文
posted @ 2017-12-11 01:42 Zhentiw 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Dictionaries may be familiar to you as hash maps. In this lesson, you will learn how to create them, get the values, and delete elements from the dict 阅读全文
posted @ 2017-12-11 01:34 Zhentiw 阅读(194) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示