Plot Livestock or Digital Asset Prices on Jupyter Notebook (Python)

Python is a powerful and versatile tool. This simple programming language allows you to analyze large data sets and apply a powerful set of tools.

Python can plot real-time data quickly. You can plot the stock and crypto data with information such as High, Low, Open, Close, and Volume. Before you use the code lines below, download Python.

In your script, enter the following code below:

Step 1: Import the right modules

pandas as pd

importpandas_data reader as getData

from matplotlib import pyplot as plt

The modules that you need are Pandas, Pandas Data reader, and Pyplot.


Step 2: Get the data you want


df = getData.get_data_yahoo('BTC-USD')


You can replace ‘BTC-USD’ with anything you want. For example, you can get Apple Data by using ‘AAPL’. The data is going to be downloaded from Yahoo Finance!


Step 3: open the df, which is your data frame (rows & column)


Data Frame is similar to Excel notebook.

Step 4: Select the variable that you want to plot


High_Price = df["High"]Low_Price = df["Low"]


You can also look at other things like Open, Close, Volume, Adj Close


Step 5: Plot the variable that you want


You can plot other columns that you are interested in. You can see here as the price of Bitcoin goes up, the range between Low and High gets larger.

Leave a Reply