{"id":119,"date":"2021-02-26T14:30:25","date_gmt":"2021-02-26T14:30:25","guid":{"rendered":"https:\/\/streetmindfood.com\/plutohash\/?p=119"},"modified":"2021-05-14T09:58:03","modified_gmt":"2021-05-14T09:58:03","slug":"explore-transaction-fees-in-a-specific-block","status":"publish","type":"post","link":"http:\/\/www.plutohash.com\/2021\/02\/26\/explore-transaction-fees-in-a-specific-block\/","title":{"rendered":"Explore Transaction Fees in a specific Block"},"content":{"rendered":"\n
In this simple tutorial we will see how you can observe the fees paid in a specific block by knowing the location of the block in the blockchain.<\/p>\n\n\n\n
We start by importing the We import the pandas library to store the data in a Now we select a specific block, in our case block 465100, and store the data regarding the fees of each transaction in a DataFrame.<\/p>\n\n\n\n This should be the result:<\/p>\n\n\n\nblocksci <\/code>library and instantiating the blockchain.<\/p>\n\n\n\n
import blocksci\nchain = blocksci.Blockchain(\"\/BlockSci\/config_file\")<\/code><\/pre>\n\n\n\n
pandas.DataFrame<\/code>, and the
seaborn <\/code>library to display the data.<\/p>\n\n\n\n
import pandas as pd\nimport seaborn<\/code><\/pre>\n\n\n\n
example_block_height = 465100\ndf = pd.DataFrame(chain[example_block_height].txes.fee_per_byte(), columns=['Satoshi per byte'])<\/code><\/pre>\n\n\n\n
df<\/code><\/pre>\n\n\n\n