How to get Bitcoin prices in Python for Beginners
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
You might want to analyze crypto prices.
In order to do some portfolio analysis or other nice things.
Here is the simplest way to retrieve data from the Coingecko free API.
The documentation is available here
The cleanest
The simplest
For the quick and dirty aficionados out there is a simpler solution. Thanks to the pandas library.
As you can see the dates are still considered as int64.
In order to format it into a human readable format you can use the pandas.to_datetime function.
I wrote an article with the code available here
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Related Articles
Continue your learning journey with these related topics
Master Data Science in Days, Not Months 🚀
Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚