October 2019
Beginner to intermediate
674 pages
16h 43m
English
The abs() function returns the absolute values of records in the DataFrame. For columns with complex values in the form x+yj, the absolute value is computed as
:
abs_df = pd.DataFrame({"Integers": [-1, -2, -3, 0, 2], "Complex": [5+2j, 1+1j, 3+3j, 2+3j, 4+2j]})abs_df.abs()
The following is the output:

Read now
Unlock full access