Python Forum
Using log to calculate difference
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using log to calculate difference
#1
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
Reply
#2
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to calculate time difference between each row of dataframe in seconds Mekala 1 2,664 Jul-16-2020, 12:57 PM
Last Post: Larz60+
  How do I calculate the smallest value that is recognized as a difference when compari AFoeee 1 2,852 Oct-28-2018, 10:48 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020