Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Series.abs() method is used to get the absolute numeric value of each element in Series/DataFrame.
Parameters: No parameters
Returns: Return the Series or DataFrame containing the absolute value of each element.
0 11.582612 dtype: float64 0 2.00 1 10.87 2 3.14 3 0.12 dtype: float64
Code #2: Explaning use of abs() on specific row
Name Age val ope 0 John 31 98 11 1 Hari 29 48 39 2 Peter 57 -80 167 3 Loani 40 -14 101
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course