Quick Introduction to Pandas Library


Pandas is a python library which provides very powerful tools to perform complex data manipulations and analysis. In this article, few of the commonly used operations are explained.

A common datastructure is a 'Dataframe'. Dataframe is a matrix type of datastructure with easy access to rows and columns.

Creation of Dataframe:

Accessing data from Dataframe:

Data in Dataframe could be accessed in various ways.

Data can also be accessed by slicing the dataframe instead of loops. It is the most efficient way of accessing data.

Creating Dataframe with Index:

We can create Dataframe with an index. Let us create a dataframe with date as index.

As we can see from above, the values are filled as NaN (Not a Number). We can replace NaN with zero using fillna() function. 


Popular posts from this blog

Pivotal Cloud Foundry (PCF) Integration with Elastic Cloud Storage (ECS)

Restful code example using Spring MVC

Spring Integration - Bulk processing Example