- Python Data Analysis(Second Edition)
- Armando Fandango
- 97字
- 2021-07-09 19:04:07
Statistics with Pandas DataFrames
The Pandas DataFrame has a dozen statistical methods. The following table lists these methods, along with a short description of each:

Using the same data as the previous example, we will demonstrate these statistical methods. The full script is in the ch-03.ipynb
of this book's code bundle:
import quandl # Data from http://www.quandl.com/SIDC/SUNSPOTS_A-Sunspot-Numbers-Annual # PyPi url https://pypi.python.org/pypi/Quandl sunspots = quandl.get("SIDC/SUNSPOTS_A") print("Describe", sunspots.describe(),"\n") print("Non NaN observations", sunspots.count(),"\n") print("MAD", sunspots.mad(),"\n") print("Median", sunspots.median(),"\n") print("Min", sunspots.min(),"\n") print("Max", sunspots.max(),"\n") print("Mode", sunspots.mode(),"\n") print("Standard Deviation", sunspots.std(),"\n") print("Variance", sunspots.var(),"\n") print("Skewness", sunspots.skew(),"\n") print("Kurtosis", sunspots.kurt(),"\n")
The following is the output of the script:


推薦閱讀
- Getting Started with Gulp(Second Edition)
- Oracle從新手到高手
- C和C++安全編碼(原書第2版)
- Android 9 Development Cookbook(Third Edition)
- 匯編語言程序設計(第2版)
- Oracle BAM 11gR1 Handbook
- GameMaker Programming By Example
- Java Web開發就該這樣學
- Python物理建模初學者指南(第2版)
- Mastering Unreal Engine 4.X
- Flask開發Web搜索引擎入門與實戰
- PhantomJS Cookbook
- Python程序設計現代方法
- Learning Swift
- WebRTC Cookbook