-
Notifications
You must be signed in to change notification settings - Fork 3
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
Package returns NaN
when it probably should return missing
#20
Comments
Hi, I understand why Happy to discuss further though. Edit: This behaviour is documented in the docs. |
Ah sorry, I had skimmed the existing issues but it wasn't obvious to me that this was discussed before. Your package your rules of course, but I would say it's definitely unusual in the Julia data community to use Generally,
will prevent you from accidentally subsetting your data with nonsensical values etc. Anyway, I use the function as |
I completely agree that I guess the deciding factor though was to allow easy integration with TimeSeries.jl and back then if I remember correctly either TSFrames.jl (which allow missing values) was not a thing yet or I just didn't know about it yet. |
Looking at the YFinance website I see:
So it looks like data is missing here for some reason. In Julia this is normally indicated by
missing
values - there is in principle a price for the security on that day, but for some reason it isn't reported in YFinance.NaN
should be reserved for results of computations that yieldNaN
like 0/0 (see e.g. this old discussion).NaN
also has the unhelpful side effect that it silently propagates through many operations, leading to often surprising errors way down a call stack because unsuspecting users (like myself) see that the data returned doesn't have missing values and therefore assume that it is complete.The text was updated successfully, but these errors were encountered: