I have a data set with a column contains STATE/UT names and also "Total" with state names.
Now i want to filter data with text contains %Total% and delete those rows (below is the screen shot)
Can anyone suggest how to clean this?
find
df = pd.DataFrame({
'STATE/UT': ['TOTAL(STATES)', 'TOTAL(UTs)', 'Normal'],
'CRIME HEAD': ['RAPE', 'RAPE', 'RAPE']
})
df[df['STATE/UT'].str.find('TOTAL') == -1]