Python look for bin referring from other table


Python look for bin referring from other table



I would like to create a new feature that obtain the bin number from another table based on its value.



Ref Table:


bin value
0 -6.417449e+00
1 -1.198942e+00
2 -9.162902e-01
3 -9.162870e-01
4 5.000000e-08
5 3.499993e-06



And another transaction data set:


index value
1 -7
2 0



What i want:


index value bin
1 -7 0
2 0 3 (-9.162870e-01 < X < 5.000000e-08)





What about some code of what you're doing?
– Federico Navarrete
Jul 2 at 10:07





Are you using pandas?
– user3483203
Jul 2 at 10:08





According to your logic for bin 3, bin 0 should represent values between -6.4 and -1.2, not -7. Please can you clarify?
– jpp
Jul 2 at 10:37






thx for reply, for anything less than -6.417449e+00 will consider as bin 0 , Yes using pandas
– foy
Jul 2 at 10:39










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages