I have a Pandas dataframe with a column called Zip Code. The column is an object data type and some rows are not in proper zip code format. I would like to remove rows that do not contain ##### format zipcode.
Subscriber Type Zip Code
0 Subscriber 94040
1 Customer 11231
2 Customer 11231
3 Customer 32
4 Customer nil
What would be an easy way to do so? Is there a way to compare format and the records something like this? df.drop(df['Zip Code'] != #####)
df=df[df['Zip Code']!=#####).