Wednesday, April 15, 2020

BASIC DATAFRAME


Basics of DataFrames and Series
Pandas:
Pandas stands for “python Data Analysis Library”. pandas is fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the python programming language.Two main basic structure of pandas is :
  •         Series
  •         DataFrame


Series:
A series is a pandas data structure that represents a one dimensional array like object containing an array of data and an associated array of data labels called index.



DataFrame:
A dataframe is a two dimensional array like, pandas data structure that stores an ordered collections columns that can stores data of different types.
Major characteristics of a DataFrame data structure  are:
a) It has two indices or two axes –a row index (axis=0) and column index (axis=1).
b) A DataFrame is the combination of row index and column index .The row index is known as index in general and the column index is called the column_name.
c )The indices can be of numbers or letters or strings.
d)You can easily changes its values, i.e it is mutable.
e) You can easily add or delete rows /columns in a DataFrame.
f) There is no conditions for all the data are the same types across the columns.
·         Common Attributes of DataFrame Objects:
ATTRIBUTE
Descriptions
INDEX
The index (row labels )of the DataFrame .
COLUMNS
The column labels of the DataFrame.
AXES
Return alist reprenting both the axes(axis=0,axis=1) .
dtypes
Return the dtypes of data in the DataFrame .
size
Return an int representing the number of element in the object.
shape
Return a tuple representing the dimension of the DataFrame.
values
Return a Numpy representing of the DataFrame .
empty
Indicates whether DataFrame is Empty .
ndim
Return an int representing the number of axes /array dimensions.
T
Transpose index and columns .

                                                           DOWNLOAD THE PDF 

0 comments:

Post a Comment