Of all the packages available in Python’s PyPI repository, pandas is probably my most used. Coming from a data analysis and Excel-heavy background it naturally fills a lot of my needs with the language. The DataFrame really shines when you have a bunch of different data sources and it only takes minimal work to build interfaces to get that data into a format that you can process with reusable tools. In particular, the yfinance library provides a nice wrapper to the unofficial Yahoo Finance API and dumps its quote data into a DataFrame.
Quite a few of my Go projects have wished for a DataFrame or something similar – especially when dealing with financial data for trading bots and the like. I’ve seen a few projects that emulate this functionality but in true Go fashion I figure I should build my own.
So far I’m very far away from building any type of DataFrame interface but I have started on the API wrapper part (for Yahoo Finance). I really like using Python’s requests library too – so nice having an elegant http client built into the standard library. I know Python has the urllib package and can send requests but it’s probably one of my least favorite tools when requests is so easy to get started with.
Anywho – for the first time in a long time I’m going to be adding to this project in a public repo (with the benefit of being able to go get this instead of uploading to a package repository). You can find it here:
https://github.com/joetats/goFinance
Should see a few more features added over time, I’ll bump it o a v1 release once I have the DataFrame and some associated methods added. If it’s useful enough I’ll probably package the DataFrame into it’s own repo – too early to tell.
Happy Friday!