Since some columns are strings, I did get numeric to exact those columns only to DF, but I received an error message when I tried to convert the negative numbers to zero
#cleaning negative minimum to equal only 0s
df2 = df._get_numeric_data()
if df2 < 0:
then = 0
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pandas/core/generic.py in __nonzero__(self)
1535 @final
1536 def __nonzero__(self):
-> 1537 raise ValueError(
1538 f"The truth value of a {type(self).__name__} is ambiguous. "
1539 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().