Featured post

Blockchain Smart Contract Theory Behind

The smart contract in Blockchain is a kind of software application that works without human intervention based on the transaction logs and provide a solution to the user request. 
I want to share the back end mechanism in the Smart Contract of Blockchain.

Smart Contract Mechanism What is Smart ContractA smart contract is a protocol which can auto-execute, facilitate, verify, or enforce the negotiation of a contract.Agreement between two parties you can say as a contract.Incorporating the rules of the physical contract into the computing world, you can say as a smart contractBlockchain supports you to create smart contracts.Smart Contracts are self-executing programs which run on the blockchain and are capable of enforcing rulesUsing Blockchain as a platform and making an agreement or contract between more than two parties, you can say as Smart Contract.Traditional Markets  4 Top Benefits of Smart ContractCurrently, smart contracts are being used only in Crypto CurrenciesNow Smart Contra…

How to use Pandas Series Method top ideas

I am sharing the ideas on how to use a series constructor on a dataset using Python pandas.

A series is an object of Pandas that represents a one-dimensional labeled array capable of holding any data type (integers, strings, floating-point numbers, Python objects, etc.).

Example of Dataframe data

Dataframe data

Example of Single Dimension Data

A single dimension data you can derive as (index, value):

 Index Value
 1 10           
 2 40
 3 01
 4 99

So, in the above "Dataframe" when you pull out the data of a single column with its index, you can say it as one-dimensional data.

When one index has multiple values in brackets, you can say it as a multi-dimensional array. The example is (1, (10,20))
mySeries = pd.Series(data, index=index)
Here, pd is a Pandas object, and data refers to a Python dictionary of "ndarray" or even a scalar value.

A Series is a single column of data from a DataFrame. It is a single dimension of data, composed of just an index and the data.

How to get Values and Index using Series Method in Python Pandas

In the first example, I show how to construct single dimension data and how to get index and values from the series data.

>>>mySeries = pd.Series([10,20,30], index=[1,2, 'a'])

In the above example, in the index, I have given 'a'. So for alpha index types, you need to give in quotes.

The result from the above code is you got both values and index.

series data 


Popular posts from this blog

Hyperledger Fabric: 20 Real Interview Questions

Hadoop fs (File System) Commands List

Python Dictionary Vs List Both Not The Same Why

How to use Blockchain on Cloud