Skip to content
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

Get Values of a Specific Column as Array (without iteration?) #201

Open
windowshopr opened this issue Nov 20, 2022 · 2 comments
Open

Get Values of a Specific Column as Array (without iteration?) #201

windowshopr opened this issue Nov 20, 2022 · 2 comments

Comments

@windowshopr
Copy link

I have a dataframe that looks like this:

image

...which I would like to start adding some new technical indicator columns to it, and looking for the easiest way to do it as I'm new to Go.

I would like to make use of the EMA function from this repo which requires the data being passed into the function to be of []float64.

Is there any easier way to convert a column of dataframe.Dataframe type values to an array without just creating an empty array and iterating over the dataframe (as my dataframe is quite large), or is there an even better way to calculate the EMA column for the dataframe? I'm coming from Python where I think I may have been spoiled with this as it was super easy to do there in Pandas, where Go just doesn't seem to have the same tools to do this.

@sushantkumr
Copy link

@windowshopr
I have a similar requirement. Have you managed to get a solution for this by any chance?

@windowshopr
Copy link
Author

Unfortunately no, other than just iterating through row by row, but it's fairly quick in go when compared to python iterating through a data frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants