Skip to content
Advertisement

How to fix not working calculation in dataframe pandas python

hello everyone i have a problem in calculation a data frame in python. i have an equation name is TOC/Total_organic. below is the picture of my equation, code to make new colomns in my data frame, and the result code and result from running the code

JavaScript

Advertisement

Answer

The problem is that math.log10 cannot handle neither pandas dataframes nor ndarrays. You can use np.log10 instead.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement