Say you have
df = pd.DataFrame({'ex': [1, datetime.time(2,19,53), "string", [1,2,3]]})
ex
0 1
1 02:19:53
2 string
3 [1, 2, 3]
You can do
df[df.ex.transform(type) == datetime.time]
To get
ex
1 02:19:53
Details:
transform(type)
yields the type of your entries
0 <class 'int'>
1 <class 'datetime.time'>
2 <class 'str'>
3 <class 'list'>
Then
df.ex.transform(type) == datetime.time
0 False
1 True
2 False
3 False
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…