I've a dataframe (called data in this post) with positive and negative values in a column. I do the following:
data.Col.min() --> results in a negative value
data_abs = data
data_abs['Col'] = data_abs['Col'].abs()
data.Col.min() --> results to the lowest absolute value in the dataframe
In my opinion I've stored the absolute values in an own variable, so I'm wondering why the code line where I convert the values to absolute values, changes my source variable recursively.
I also get the same result when trying to convert the values by this:
data_abs['Col'] = abs(data_abs['Col'])