While it is not one of the popular programming languages for data science, The Go Programming Language (aka Golang) has surfaced for me a number of times in the past few years as an option for data science. I decided to do some searching and find some conclusions about whether golang is a good choice for data science.
Popularity of Go and Data Science
As the following figure from Google Trends demonstrates, golang and data science became trendy topics at about the same time and grew at a similar rate.

The timely trends may have created the desire to merge the two technologies together.
Golang Projects for Data Science
Some internet searching will reveal a number of interesting data-focused projects on Github. Unfortunately, many of the projects had good initial traction but have dwindled in activity over the last couple years. Below is a listing of some of the data science related projects for the Go Programming Language.
- Gopher Data – Gophers doing data analysis, no schedule events, last blog post was 2017
- Gopher Notes – Golang in Jupyter Notebooks
- Lgo – Interactive programming with Jupyter for Golang
- Gota – Data frames for Go, “The API is still in flux so use at your own risk.”
- qframe – Immutable data frames for Go, better speed than Gota but not as well documented
- GoLearn – Machine Learning for Go
- Gorgonia – Library for machine learning in Go
- Go Sklearn – Port of sci-kit learn from Python, still active but only a couple committers, early but promising
- Gonum – Numerical library for Go, very promising and active
Golang Data Science Books
There have even been a couple books written about the topic.
Machine Learning with Go, 2nd Ed.
The second edition was just published in 2019
Go Machine Learning Projects
This book uses gonum and gorgonia in the examples. It was published in 2018.
Thoughts from the Community
The “Go for Data Science” debate has been discussed numerous times over the past few years. Below is a listing of some of those discussions and the key take aways.
- Machine Learning with Go? on Reddit
“and once you know what you are going to do, implementing the training and deploying in Go is much better” - Golang for Data Science on Reddit
“most likely it won’t be go and be one of more academia adopted languages like Python, MatLab or Julia” - Data Science Gophers – O’Reilly Blog Post
- Moving From Python to Go – Towards Data Science blog post
not data science specific, but helpful - Go for Data Science
by the author of gorgonia and one of the books, includes a great presentation slidedeck - Why we switched from Python to Go
also, not data science specific - Go vs Python 3 Benchmarks
Go performs much better than Python on benchmarks - Can Go really be that much faster than python? Stackoverflow
“Go really can be that much faster than python”
Reasons to use Go for Data Science
- Performance
- Concurrency
- Strong Developer Ecosystem
- Basic Data Science packages are available
Reasons Not to use Go for Data Science
- Limited support from the data science community for Golang
- Significantly increased time for exploratory analysis
- Less flexibility to try other optimization and ML techniques
- The data science community has not really adopted the Go programming language
Summary
In short, Golang is not widely used for exploratory data science, but rewriting your algorithms in Golang might be a good idea. However, the latest push is “Python for Machine Learning and Go for Infrastructure”.
For more data science related articles, read the rest of the Data Science 101 blog.
Leave a Reply