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.

golang vs data science growth via Google Trends
Golang vs Data Science growth in popularity

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 book cover
Go Machine Learning

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.

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”.

About Ryan Swanstrom

Creator of Data Science 101

View all posts by Ryan Swanstrom

2 Comments on “GoLang for Data Science”

  1. Golang for Data Analytics Applications is a suitable choice because of its standard official libraries which enable easy data parsing, sorting, analyzing and visualizing.
    click to Know more: http://bit.ly/2OGIS1q

Leave a Reply

Your email address will not be published. Required fields are marked *