Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Pandas Series: abs() function

Pandas absolute value of column

The abs() function is used to get a Series/DataFrame with absolute numeric value of each element.

This function only applies to elements that are all numeric.

Syntax:

Series.abs(self)
Pandas Series abs image

Parameters: No parameters

Returns: Series/DataFrame containing the absolute value of each element.

Notes: For complex inputs, 1.2 + 1j, the absolute value is √a2+b2

Example:


Download the Pandas Series Notebooks from here.

Previous: Exponential weighted functions in Pandas
Next: Test whether all element is true over requested Pandas axis