-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bikeshed name for kwarg that preserves dates consumed by computation #47
Comments
Is |
Yes, I suppose you could just use |
I did not know v0.4 is coming soon and could not find much info on that. Any pointers on the expected time frame? Could you share the links? |
|
well, it's been 9 months and I feel everyone's getting ready to finalize what must be done first and what can wait until https://groups.google.com/forum/#!topic/julia-dev/Q1K3MvNYvJo |
DataFrames uses I like that, quite frankly. It does conflate
Edit: that's too many letters and easy to mis-spell I guess ;) |
How about using a new placeholder? I was thinking of using |
In this case, the kwarg would be |
|
A 10-period moving average cannot be computed on a distance less than 10, so when performing this computation on a data structure, the first 9 values don't have any reasonable value. This package consumes these dates, throwing them into the black hole of time-space where they belong. The resulting data structure has 9 less rows than the original data structure. This is what happens when you do these sorts of things on data.
Alas, many researchers don't like this behavior. Similar packages in R and pandas don't do this, for example. They populate the value slot consumed by computation with
NA
in the case of R, or the sentinelNaN
in the case of pandas.The most compelling reason to allow this behavior is that there are times when you'd like to merge or combine different data structures, and if you cut short a transformed column, you're going to face losing meaningful data in the other data structure.
For example, suppose you have a need for a TimeArray that includes closing prices and their 10-period moving average.
The argument that the
sma10
column shouldn't represent values where none make sense is reasonable, but this has now consumed meaningful values found in theClose
column.Solution with
Nullable{Float64}
Now that
Nullable{Float64}
is available, we can allow consumed timestamps to put the Julian sentinel in this slot. This package (or probably TimeSeries should do this) can define ashow
method to represent this asNA
when displaying. This is preferred because it's terse and everyone knows whatNA
means (not really, but we all think we do).Bike shed
What should the name be for a kwarg that allows consumed dates to be represented with Julian sentinels?
consume = true
preserve_dates = false
sentinalize = false
(is that even a word?)NA = false
The text was updated successfully, but these errors were encountered: