Common statistical methods for pandas

Source: Internet
Author: User
Statistical methods

Pandas objects have some statistical methods. Most of them are reduction and summary statistics that are used to extract a single value from a Series, or to extract a Series from a dataframe row or column.

For example, the Dataframe.mean (axis=0,skipna=true) method, when NA values are present in the dataset, are simply skipped, unless the entire slice (row or column) is all NA, and if you do not want to, you can disable this feature by Skipna=false:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23-24 >>> DF One two a 1.40 nan b 7.10-4.5 c nan nan d 0.75-1.3 [4 rows x 2 columns] >>& Gt Df.mean () One 3.083333 two-2.900000 dtype:float64 >>> Df.mean (axis = 1) a 1.400

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.