+ 2
Probably you got that at Pandas. 'loc' accesses a row by its name, 'iloc' does the same with row number. Ex. import pandas as pd df = pd.DataFrame({'a':[1,2],'b':[3,4]}, index = ['first', 'second']) #it creates two row, first and second print(df.loc['first']) print(df.iloc[0]) # both prints the same
24th Oct 2020, 11:27 AM
Md. Faheem Hossain
Md. Faheem Hossain - avatar