I want to drop all rows of my dataframe where the value in a row is not str
# example data
df = pd.DataFrame([(1, 'test1'), (2, 'test2'), (3, 3.14)])
df.columns = ['row1', 'row2']
I came up with this solution, but is there a simpler, more pythonic way? Having to use apply()
seems messy.
df[df['row2'].apply(type) == str]