Python Forum

Full Version: Using log to calculate difference
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I have some code for diluting the difference between results using numpy.log. It goes like:

df[new value]=(np.log(df[values1]-nplog(df[values2])/np.log(2),df[values1]-df['values3])

The above is not the actual code, just a layout. I am getting a ValueError: Length of values (2) does not match length of index (416)

I'm not 100% sure what this means. Am I missing some code?

Thanks
Lots of typos there (missing period, unbalanced parenthesis, unbalanced quotes, missing quotes?) When I tried to clean it up and run I get a different error. Want to try again?