- 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:


推薦閱讀
- JavaScript全程指南
- 微信公眾平臺與小程序開發:從零搭建整套系統
- C#完全自學教程
- AngularJS Web Application Development Blueprints
- Python Game Programming By Example
- Python Tools for Visual Studio
- 微信公眾平臺開發:從零基礎到ThinkPHP5高性能框架實踐
- Quarkus實踐指南:構建新一代的Kubernetes原生Java微服務
- 數據結構習題解析與實驗指導
- .NET 4.5 Parallel Extensions Cookbook
- Building Serverless Architectures
- JavaScript+jQuery網頁特效設計任務驅動教程
- Learning Python Data Visualization
- C++ System Programming Cookbook
- Java并發實現原理:JDK源碼剖析