how to check all values in particular column has same data type or not? I have column 'ABC' which has 5000 rows. Currently, dtype of column is object. Mostly it has string values but some values dtype is not string, I want to find all those rows and modify those rows. Column is as following:

1 abc
2 def
3 ghi
4 23
5 mno
6 null
7 qwe
8 12-11-2019
...
...
...
4900 ert
5000 tyu


In above case, I can use for loop to find out rows which do not have desired dtype. I just wanted to know, is their better way to solve this issue.

Note: I am using Pandas.
You can get the type of the entries of your column with map:

df['ABC'].map(type)


So to filter on all values, which are not stored as str, you can use:

df['ABC'].map(type) != str


If however you just want to check if some of the rows contain a string, that has a special format (like a date), you can check this with a regex like:

df['ABC'].str.match('[0-9]{4}-[0-9]{2}-[0-9]{2}')


But of course, that is no exact date check. E.g. it would also return True for values like 0000-13-91, but this was only meant to give you an idea anyways.