Pandas is the most popular and important python library that is used for data analysis or data science.It provides highly optimized performance with back-end source code is purely written in C or Python. If you want to learn more about Pandas or other Python libraries, you can enroll in a Python Training course to learn directly from the experts.
Import this library in your program :
-Importing any library or module means that we are able to call the methods of the library which we import.
import is a keyword that are used to import the any module or librray.
1. import pandas
-Here we just import the pandas library but not import everything from it.
-any method of pandas are call by pandas.method()
2. from pandas import *
-Here we import all methods which written in pandas library, and we directly call their methods by the method name.
-No need of object to call the methods.
3. import pandas as pa
-It is similar as first one but in this case we call the methods by pa.method()
-Goto search icon on your window screen.
-Search 'cmd'
-Write the following command:
pip install pandas
1. Series
2. DataFrames
-series is one dimensional array defined in pandas library that can be used to store any data type.
Syntax-
pandas.Series(data,index)
Here data can be
1. scalar value like string,integer,float
2. python dictionary
3. Ndarray
-Here index part is optional, by default it is 0,1,2,3,4,......
-It is a two dimensional data structure defined in pandas which consists of rows and columns.
Syntax-
pandas.DataFrame(data)
Here data can be :
1. one or more dictionary.
2. one or more series
3. 2D numpy Ndarray