Pandas

Pandas

Pandas is a Python library for data analysis. Started by Wes McKinney in 2008 out of a need for a powerful and flexible quantitative analysis tool, pandas has grown into one of the most popular Python libraries. It has an extremely active community of contributors.

Pandas is an open source Python package that is most widely used for data science/data analysis and machine learning tasks. It is built on top of another package named Numpy, which provides support for multi-dimensional arrays

How to import Pandas library:- Pandas is usually imported under the pd alias. alias: In pandas alias are an alternate name for referring to the same thing. Create an alias with the as keyword while importing: import pandas as pd.

No alt text provided for this image

Lets create a data frame:- firstly I will import the pandas library and create a dictionary and convert dictionary to Dada Frame by using the pd.DataFrame()

Ex.

No alt text provided for this image


df.head():-this function is use to print by default starting 5 rows

No alt text provided for this image

df.tail():-this function is use to print by default ending 5 rows

No alt text provided for this image

df.sample():-this function is use to print random rows

No alt text provided for this image

df.describe():-this function is use to print the description about the data frame

No alt text provided for this image

df.to_csv (“file name”):- this function  are use to export the data which to want format like df.to_csv , df.to_json , and df.to_pdf

No alt text provided for this image

pd.read_csv(“path\\file_name.formate”):- this function are use to import the date is work sheet and different different formate like pd.read_csv(),pd.read_json

No alt text provided for this image

Slicing :- pandas library are support the slicing lets I will show some example for slicing

No alt text provided for this image

Series():- series is one dimensional array with its index it store a simple column or row of data

No alt text provided for this image

Data_Frame():-it is a tabular or spreadsheet like structure represting row each witch continue one and more columns

No alt text provided for this image

To view or add a comment, sign in

More articles by Rajendra Kumar

  • Transaction and ACID Properties

    What is Transaction? -> Transactions are a set of operations that are used to perform some logical set of work. -> A…

  • Certificate

    Hi Everyone , I have successfully completed the "GIT and Github" course offered by REGex Software Services

    1 Comment
  • NumPy Library

    What is a Numpy:- NumPy is a Python library used for working with arrays. It also has functions for working in domain…

    1 Comment
  • outlier find and remove in data

    Hello everyone I will share a Article about how to find and remove outlier in data What is outlier in data:- outliers…

    1 Comment

Explore content categories