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.
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.
df.head():-this function is use to print by default starting 5 rows
df.tail():-this function is use to print by default ending 5 rows
df.sample():-this function is use to print random rows
df.describe():-this function is use to print the description about the data frame
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
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
Slicing :- pandas library are support the slicing lets I will show some example for slicing
Series():- series is one dimensional array with its index it store a simple column or row of data
Data_Frame():-it is a tabular or spreadsheet like structure represting row each witch continue one and more columns