-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Allow for near misses when doing alignment with Float64Index? #9530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There is some code here, which is currently not used anywhere (and I don't recall when / how was used). To do something like this. I agree that perhaps |
Thanks for CCing me Stephan. I absolutely have encountered. I still havent' gotten around to updating scikit-spectra to pandas > 0.14 (lots of other projects, grad school), so in 0.14, I can't even test some of this because it would result in an error. Therefore, I'm pleased to see that you at least get output in these operations.
Still using 0.14.1 on this machine. For the most part, I've just avoided dealing with this issue, but am glad to see it's not just me losing my marbles! |
@hugadams I think you can make this example work on older versions of pandas by changing s1.index to s1.index.values. |
Seems like there hasn't been much movement on this feature request in years so closing |
The "exact match" requirement for index alignment doesn't work very well when using Float64Index if the index values may result from computations.
Here's an example of how the current behavior results in a poor user experience:
reindex/joins with
method='nearest'
will help (#9258), but automatic alignment will still remain broken. Ideally, we should figure out some way for array alignment to ignore very small differences that are almost certainly due to the precision limits of floating point arithmetic.I'm not entirely sure what the right solution here looks like, but I wanted to open this to discussion.
CC @hugadams who I'm guessing has almost certainly encountered these sort of issues when doing computations on indexes for scikit-spectra.
The text was updated successfully, but these errors were encountered: