I am trying to get the subset dataframe using the below code:
dprev = "eiffel tower"
df.loc[df['place'] == dprev] -> returns empty
drandom = random.choice(df['place'].unique())
df.loc[df['place'] == drandom] -> returns the subset
why am i not seeing the same thing when dprev
is string variable?