Closed khughitt closed 4 years ago
I am reluctant to add more content to the readme because it is already too big. I want to readme to be nothing more than a general introduction.
The plan is:
When I get some time I will do it.
I was hoping that using the godocs, people would eventually work out how to do the tasks you mentioned such as: retrieve single row, retrieve a single column etc - even if it takes 5 minutes instead of 30 seconds.
That's fair.
I agree that re-purposing the README.md as a manual is probably not ideal, so a separate Hugo-based manual sounds great.
That is also understandable regarding uisng godocs. The only reason is took longer really is because I'm still fairly new to Go programming in general, but even then, I was still able to figure most things out on my own with a little effort. I suspect other users with a bit more experience would have even less trouble.
Thanks for taking the time to respond and share your plans!
Feel free to close this issue, unless you want to use is to track progress on the manual front.
Do you want to write the manual (under my guidance)?
Realistically, I probably won't have the time to..
If you want though, perhaps you could create an outline for what you have in mind as far as the manual, and just hold off making it public / keep it in a separate branch initially.
Then, as I'm working through different things I can try and help fill in sections of it.
Quick question -- how do you retrieve the values for a single column in a dataframe, given the column name?
I tried to figure it out from the code for DataFrame and Series, but have not had any luck..
https://godoc.org/github.com/rocketlaunchr/dataframe-go#DataFrame.NameToColumn https://godoc.org/github.com/rocketlaunchr/dataframe-go#DataFrame df.Series[idx] will return the Series.
If the series is a SeriesFloat64, you can then use the .Values
field to get an []float64
of all the values. But otherwise you need to iterate to obtain the values.
Ah got it. I had tries using df.Series[df.NameToColumn("foo")].Values
, but this was for a SeriesInt64 column, so it wasn't working.
Thanks for the quick response and suggestions!
Nametocolumn returns 2 values. So you can't inline.
You can use MustNameToColumn instead
Yep. I realized that shortly after posting. Haven't tried MustNameToColumn
though.. I'll check it out. Thanks for the tip!
On the topic of documentation, one more thing that could be useful to consider including (probably in the README, and not the manual) would be a quick overview with what you see as the strengths (and limitations) of dataframe-go vs.
Greetings!
Just a minor suggestion, but if you have the time, it could be useful to expand the docs a bit more to cover some additional common operations applied to dataframe-like structures, where supported.
For example:
Further, one other thing I noticed when employing the package for the first time, is that many of the
dataframe.xx()
function calls include anil
as the first argument.From looking at the code for
dataframe.go
, these appear to be relating to an optionalOptions
struct, so it makes sense that this would be set tonil
in many instances. It may just be worth mentioning this explicitly in the examples for.Append()
in the docs.Finally two other things that could be useful to consider including in the docs:
Thanks for taking the time to put together and share this really useful package!