I am trying to find out how many records are there and I thought that there were 2 ways to show the total number of records. However, they show different lengths, why is this happening?
I listed both ways below, to elaborate further one line has the .shape[0] attribute while the other has the .value_counts() attribute
df.loc[(df['rental_store_city'] == 'Woodridge') & (df['film_rental_duration'] > 5)].shape[0]
output: 3186
df.loc[(df['rental_store_city'] == 'Woodridge') & (df['film_rental_duration'] > 5)].value_counts()