filmov
tv
9. loc, iloc, iat, at & ix Pandas Data Frame | Python Pandas Tutorial
Показать описание
In this video , I have explained loc, iloc, iat, at & ix Pandas Data Frame very clearly.
loc : Access A Group Of Rows And Columns By Label(s).
iloc: Access A Group Of Rows And Columns By Integer Position(s)
iat: Access a single value for a row/column pair by integer position,Similar to `iloc`, in that both provide integer-based lookups. Use`iat` if you only need to get or set a single value in a DataFrame or Series.
at: Access a single value for a row/column label pair. Similar to `loc`, in that both provide label-based lookups. Use `at` if you only need to get or set a single value in a DataFrame or Series.
ix: In pandas version 0.20.0 and above, ix is deprecated and the use of loc and iloc is encouraged instead.
-------------------------------------------------------
DataFrame:
-----------------------------------------------------
dict1 ={'Name':['Priyang','Aadhya','Krisha','Vedant','Parshv',
'Mittal','Archana'],
'Marks':[98,89,99,87,90,83,82],
'Grades':['AA','AB','AA','AB','AC','BA','BB']
}
df1=pd.DataFrame(dict1,index=['stu1','stu2','stu3','stu4','stu5',
'stu6','stu7'])
-----------------------------------------------------------------
If you enjoy these tutorials, like the video, and give it a thumbs up and also share these videos with your friends and families if you think these videos would help him.
Please consider clicking the SUBSCRIBE button to be notified of future videos.
Thank you all for watching
loc : Access A Group Of Rows And Columns By Label(s).
iloc: Access A Group Of Rows And Columns By Integer Position(s)
iat: Access a single value for a row/column pair by integer position,Similar to `iloc`, in that both provide integer-based lookups. Use`iat` if you only need to get or set a single value in a DataFrame or Series.
at: Access a single value for a row/column label pair. Similar to `loc`, in that both provide label-based lookups. Use `at` if you only need to get or set a single value in a DataFrame or Series.
ix: In pandas version 0.20.0 and above, ix is deprecated and the use of loc and iloc is encouraged instead.
-------------------------------------------------------
DataFrame:
-----------------------------------------------------
dict1 ={'Name':['Priyang','Aadhya','Krisha','Vedant','Parshv',
'Mittal','Archana'],
'Marks':[98,89,99,87,90,83,82],
'Grades':['AA','AB','AA','AB','AC','BA','BB']
}
df1=pd.DataFrame(dict1,index=['stu1','stu2','stu3','stu4','stu5',
'stu6','stu7'])
-----------------------------------------------------------------
If you enjoy these tutorials, like the video, and give it a thumbs up and also share these videos with your friends and families if you think these videos would help him.
Please consider clicking the SUBSCRIBE button to be notified of future videos.
Thank you all for watching
Комментарии