Notes of using Python for Data Analytics

Chapter 0: Foundations of Python Basic syntax Data types, indexing, and slicing Flow control and looping Functions Object-oriented programming List comprehensions Regular expression Data input and output Basic text files Excel Database Chapter 1: Essential libraries Numpy Pandas Basic data visualization Scatter Plots Histograms Cumulative Frequencies Error-bars Box plots Pie Charts Chapter 2: Statistics brief…

Random number in Python

A brief note about random number in Python For this purpose, we need import random module. random.random()用於生成一個0到1的隨機符點數: 0 <= n < 1.0 0.14812154696888702 random.random(a,b)用來產生介於a與b之間的整數 14 random.uniform(a,b)用來產生介於a與b之間的浮點數 14.255325776146638 上述函數其實也就是Uniform distribution, 而Python當中還提供了相當多的統計分配: uniform triangular normal (Gaussian) lognormal negative exponential gamma beta pareto Weibull 例如常見的常態分配, gauss() 6.040336918401728