- Training Systems Using Python Statistical Modeling
- Curtis Miller
- 206字
- 2021-06-24 14:20:42
Computing descriptive statistics
In this section, we will review methods for obtaining descriptive statistics from data that is stored in a pandas DataFrame. We will use the pandas library to compute statistics from the data. So, let's jump right in!
DataFrames come equipped with many methods for computing common descriptive statistics for the data they contain. This is one of the advantages of storing data in DataFrames—working with data stored this way is easy. Getting common descriptive statistics, such as the mean, the median, the standard deviation, and more, is easy for data that is present in DataFrames. There are methods that can be called in order to quickly compute each of these. We will review several of these methods now.
If you want a basic set of descriptive statistics, just to get a sense of the contents of the DataFrame, consider using the describe() method. It includes the mean, standard deviation, an account of how much data there is, and the five-number summary built in.
Sometimes, the statistic that you want isn't a built-in DataFrame method. In this case, you will write a function that works for a pandas series, and then apply that function to each column using the apply() method.
- The Complete Rust Programming Reference Guide
- Magento 2 Theme Design(Second Edition)
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第2版)
- 名師講壇:Spring實戰開發(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- Swift語言實戰精講
- 零基礎Java學習筆記
- Python程序設計與算法基礎教程(第2版)(微課版)
- Python編程:從入門到實踐(第3版)
- 算法設計與分析:基于C++編程語言的描述
- Maven for Eclipse
- 程序員必會的40種算法
- Professional JavaScript
- SAS編程演義
- Java Web動態網站開發(第2版·微課版)
- Apache Solr for Indexing Data