Professional Documents
Culture Documents
Sample QP For AISSCE Practical Exam IP
Sample QP For AISSCE Practical Exam IP
# DataFrame
import pandas as pd
S1 = [100,"AYUSH","12D"]
S2 = [101,"PALASH","12A"]
S3 = [102,"VISHAL","12C"]
DF = pd.DataFrame([S1,S2,S3],columns=["ROLLNO","NAME","CLASS"])
#print(DF) # Show Full Data Frame
print(DF.iloc[1:2,1:2]) # iloc - Index Location of a Record in Data Frame
# Revision of DataFrame
import pandas as pd
R1 = {"ROLLNO":12401,"NAME":"ALFIYA"} # Rows creates with Dictionary
R2 = {"ROLLNO":12402,"NAME":"AYUSH"}
R3 = {"ROLLNO":12403,"NAME":"RAM"}
DF = pd.DataFrame([R1,R2,R3]) # DataFrame creates with list of Dictionaries
DF
______
import pandas as pd
R1 = {"TID":"T1","TNAME":"S K UPADHAYAY","POST":"PGT","SUB":"COMP. SC."}
R2 = {"TID":"T2","TNAME":"P PIPLODIA","POST":"PGT","SUB":"ACCOUNTANCY"}
R3 = {"TID":"T3","TNAME":"Y K TIRKEY","POST":"PGT","SUB":"ENGLISH"}
TEACHER = pd.DataFrame([R1,R2,R3])
TEACHER