What is the difference between the following approaches to get the rows from a column of df
, a pandas DataFrame :
df['col_name'][x:y]
vs.
df.loc[x:y,'col_name']
What is the difference between the following approaches to get the rows from a column of df
, a pandas DataFrame :
df['col_name'][x:y]
vs.
df.loc[x:y,'col_name']