Book Image

Hands-On Bitcoin Programming with Python

By : BignumWorks Software LLP
Book Image

Hands-On Bitcoin Programming with Python

By: BignumWorks Software LLP

Overview of this book

Bitcoin is a cryptocurrency that’s changing the face of online payments. Hands-On Bitcoin Programming with Python teaches you to build software applications for mining and creating Bitcoins using Python. This book starts with the basics of both Bitcoin and blockchain and gives you an overview of these inherent concepts by showing you how to build Bitcoin-driven applications with Python. Packed with clear instructions and practical examples, you will learn to understand simple Python coding examples that work with this cryptocurrency. By the end of the book, you’ll be able to mine Bitcoins, accept Bitcoin payments on the app, and work with the basics of blockchain technology to create simply distributed ledgers.
Table of Contents (6 chapters)

Exploring, manipulating, and visualizing the cleaned-up data

As the data cleanup is done, start with the data exploration tasks. We can use the pandas date-time capabilities to run some interesting queries.

For example, if we want to get all the records from a particular year, pass that year to the DataFrame inside square brackets. The following screenshot shows the price data from the year 2010:

We can also specify whether we want the data from a particular date.

The following screenshot shows the bitcoin price in USD from August 1, 2017:

We can also specify whether we want the data from a particular period spanning certain dates.

The following screenshot shows the data from August 1, 2017, onward:

Statistical information can also be retrieved using pandas methods. For example, to get the minimum price from this dataset, we can use the min() method, as shown in the following...