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)

Getting, reading in, and cleaning bitcoin price data

We will start by importing the necessary modules.

Import pandas to enable you to read in the data and start exploring it. The following screenshot shows the import pandas command:

Also, import matplotlib for drawing plots from the data.

We need to set some options for pandas and matplotlib. The following screenshot shows the command for importing matplotlib:

The first option we will set is called options.mode.chained_assignment = None.

The preceding option is to make sure that the operations are for the cleanup, which will be performed on the pandas DataFrame objects; we want the cleanup to happen on the original DataFrame objects and not on copies.

The following screenshot shows the options.mode.chained_assignment = None option:

Also, set matplotlib to visualize and display all the charts shown in the following screenshot...