Ad

Wednesday, March 21, 2018

Difference between iloc and loc in Pandas

ix is deprecated, use of iloc and loc are encouraged.

.loc for label based indexing or
.iloc for positional indexing

Useful for querying row data
df.head(5)
df.loc[0:5]
Also powerful for column based querying
df_pro_desc.loc[0:2,["col_1", "col_2"]]

No comments:

Post a Comment

Machine Learning with No Code

AutoML machine learning deep learning without code by Uber, Ludwig allows users to train and make inference deep learning model without co...