I have a pandas df
with two variables:
id name
011 Peter Parker
022 Warners Brother
101 Bruce Wayne
Currently both of them are of object type.
Say I want to create smaller dataframes by filtering with some conditions
df_small = df.loc[df['id']=='011']
df_small2 = df.loc[df['name']=='Peter Parker']
I have thought of and seen people converting the object-type column into other specific data type. My question, do I need to do that at all if I can filter them based on string comparison (as above) already? What are the benefits of converting them into a specific string or int/float type?