duplicates = us_census.State.duplicated() print(duplicates.value_counts()) us_census = us_census.drop_duplicates() print(us_census)
I checked the state column for duplicates and found there were.
At first I didnt use .State and it returned no duplicates so then I included .State
But when I try to drop duplicates, it doesn’t work. The df us_census is still the same including the duplicates.
Not sure what I am doing wrong here.
I tried to include .State but that would only return the State column