DataFrames
❑A data frame is a two-dimensional array, with
labeled axes (rows and columns having a
specific name or Label).
❑A data frame is a standard way to store data.
❑Size is Mutable.[Can Change]
1.Homogeneous Data
2.Size Immutable
3.Values of data are Mutable
1.Heterogeneous data
2.Size Mutable
3.Data mutable
Series
Data Frames
Rows i.eaxis=0,
columns i.eaxis=1
Source :- https://www.geeksforgeeks.org
1.Creationn of DataFrame
•Empty DataFrame
•Dictionary of List
•Dict of Dict
•List of Dict
•List of List
•Dict of Series
1.Creationn of DataFrame
•Empty DataFrame
1.Creationn of DataFrame
•Dictionary of List
3/21/2024 11
1.Creationn of DataFrame
•Dict of Dict
1.Creationn of DataFrame
•Dict of Dict
import pandas as pd
#Dictionary of Dictionary
Dict={"Name":{"R1":"Rose","R2":"Delina","R3":"Komal","R4":"Poonam","R5":"Komal"},
"Marks":{"R1":10,"R2":12,"R3":13,"R4":23,"R5":90},
"City":{"R1":"Kota","R2":"Delhi","R3":"Delhi","R4":"Goa","R5":"Delhi"}}
Df=pd.DataFrame(Dict)
print(Df)
1.Creationn of DataFrame
•Empty DataFrame
•Dictionary of List
•Dict of Dict
•List of Dict
•List of List
•Dict of Series