'Check if pandas dtype is string[python?
I want to check if the dtype of my columns are of the following type: string[python].
print(data.dtypes)
1 string
2 string
3 string
4 string
5 string
6 int
7 string
8 string
9 float
10 string
dtype: object
I want to perform something like:
data.dtypes == string[python]
and in returns:
1 True
2 True
3 True
4 True
5 True
6 False
7 True
8 True
9 False
10 True
dtype: object
ps
print(data.dtypes[0])
string[python]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
