Closed femtotrader closed 7 years ago
You can drop the to
and just call the method timearray
, which would be more idiomatic Julia.
And yes, it would require DataFrames
as a dependency so this method belongs in a separate package.
You can drop the to and just call the method timearray, which would be more idiomatic Julia.
Actually, the idiomatic Julia version would be to add this method to the TimeArray
constructors, and possibly to convert
.
I've tried this before and it would require DataFrames to be a dependency. But otherwise yes, TimeArray
not timearray
It may be possible to add this feature without adding DataFrames as a dependency.
Requires.jl https://github.com/MikeInnes/Requires.jl could be a solution, isn't it ?
This will bloat the code. I'm against adding any dependencies.
I think a good project though would be to start a new package that does many of the things you've asked for in TimeSeries. Call it TimeSeriesReader maybe?
If you want to start the package I'd be happy to contribute. You don't need to stop at DataFrames. Why not include other sources including various databases? It might be a good place to implement streaming time series data.
Repository TimeSeriesReader.jl created.
Edit: renamed https://github.com/femtotrader/TimeSeriesIO.jl (as it can import to TimeSeries but also export from TimeSeries)
Watching it ... 👍
Feel free to contribute...
For example I haven't been able to name function TimeArray
.
I don't understand why... that's the "reason" of this to_TimeArray
name
A good solution would be to support reading data from DataStreams, so that you don't need to reinvent the wheel for every possible data source.
Converting TimeArray to DataFrame can be done using IterableTables.jl from @davidanthoff
After https://github.com/davidanthoff/IterableTables.jl/issues/46 being fixed we should be able to convert more easily DataFrame to TimeArray.
That's fixed!
Hello,
I haven't find in doc an easy way to convert a DataFrame to TimeArray
Maybe such function should be part of TimeSeries (without adding DataFrames as a dependency) or should be given as a "recipe" in doc.