Comparison with astype(int)

Tentatively convert your column to int and test with np.array_equal:

np.array_equal(df.v, df.v.astype(int))
True

float.is_integer

You can use this python function in conjunction with an apply:

df.v.apply(float.is_integer).all()
True

Or, using python's all in a generator comprehension, for space efficiency:

all(x.is_integer() for x in df.v)
True
Answer from coldspeed95 on Stack Overflow
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.api.types.is_integer_dtype.html
pandas.api.types.is_integer_dtype — pandas 3.0.1 documentation
Check whether the provided array or dtype is of a float dtype. ... An ExtensionDtype for Int64Dtype integer data. ... >>> from pandas.api.types import is_integer_dtype >>> is_integer_dtype(str) False >>> is_integer_dtype(int) True >>> is_integer_dtype(float) False >>> is_integer_dtype(np.uint64) True >>> is_integer_dtype("int8") True >>> is_integer_dtype("Int8") True >>> is_integer_dtype(pd.Int8Dtype) True >>> is_integer_dtype(np.datetime64) False >>> is_integer_dtype(np.timedelta64) False >>> is_integer_dtype(np.array(["a", "b"])) False >>> is_integer_dtype(pd.Series([1, 2])) True >>> is_integer_dtype(np.array([], dtype=np.timedelta64)) False >>> is_integer_dtype(pd.Index([1, 2.0])) # float False
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.Series.str.isnumeric.html
pandas.Series.str.isnumeric — pandas 3.0.1 documentation
Check whether all characters in each string are numeric. This is equivalent to running the Python string method str.isnumeric() for each element of the Series/Index. If a string has zero characters, False is returned for that check.
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.api.types.is_integer_dtype.html
pandas.api.types.is_integer_dtype — pandas 2.3.3 documentation
The array or dtype to check. ... Whether or not the array or dtype is of an integer dtype and not an instance of timedelta64. ... >>> from pandas.api.types import is_integer_dtype >>> is_integer_dtype(str) False >>> is_integer_dtype(int) True >>> is_integer_dtype(float) False >>> is_integer_dtype(np.uint64) True >>> is_integer_dtype('int8') True >>> is_integer_dtype('Int8') True >>> is_integer_dtype(pd.Int8Dtype) True >>> is_integer_dtype(np.datetime64) False >>> is_integer_dtype(np.timedelta64) False >>> is_integer_dtype(np.array(['a', 'b'])) False >>> is_integer_dtype(pd.Series([1, 2])) True >>> is_integer_dtype(np.array([], dtype=np.timedelta64)) False >>> is_integer_dtype(pd.Index([1, 2.])) # float False
🌐
Pandas
pandas.pydata.org › pandas-docs › version › 0.22 › generated › pandas.api.types.is_integer_dtype.html
pandas.api.types.is_integer_dtype — pandas 0.22.0 documentation
>>> is_integer_dtype(str) False >>> is_integer_dtype(int) True >>> is_integer_dtype(float) False >>> is_integer_dtype(np.uint64) True >>> is_integer_dtype(np.datetime64) False >>> is_integer_dtype(np.timedelta64) False >>> is_integer_dtype(np.array(['a', 'b'])) False >>> is_integer_dtype(pd.Series([1, 2])) True >>> is_integer_dtype(np.array([], dtype=np.timedelta64)) False >>> is_integer_dtype(pd.Index([1, 2.])) # float False
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.api.types.is_numeric_dtype.html
pandas.api.types.is_numeric_dtype — pandas 3.0.1 documentation
Check whether the provided array or dtype is of a signed integer dtype. ... >>> from pandas.api.types import is_numeric_dtype >>> is_numeric_dtype(str) False >>> is_numeric_dtype(int) True >>> is_numeric_dtype(float) True >>> is_numeric_dtype(np.uint64) True >>> is_numeric_dtype(np.datetime64) False >>> is_numeric_dtype(np.timedelta64) False >>> is_numeric_dtype(np.array(["a", "b"])) False >>> is_numeric_dtype(pd.Series([1, 2])) True >>> is_numeric_dtype(pd.Index([1, 2.0])) True >>> is_numeric_dtype(np.array([], dtype=np.timedelta64)) False
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.api.types.is_int64_dtype.html
pandas.api.types.is_int64_dtype — pandas 3.0.1 documentation
Check whether an array-like or dtype is of the object dtype. ... Numpy’s 64-bit integer type. ... Depending on system architecture, the return value of is_int64_dtype( int) will be True if the OS uses 64-bit integers and False if the OS uses 32-bit integers. ... >>> from pandas.api.types import is_int64_dtype >>> is_int64_dtype(str) False >>> is_int64_dtype(np.int32) False >>> is_int64_dtype(np.int64) True >>> is_int64_dtype("int8") False >>> is_int64_dtype("Int8") False >>> is_int64_dtype(pd.Int64Dtype) True >>> is_int64_dtype(float) False >>> is_int64_dtype(np.uint64) # unsigned False >>> is_int64_dtype(np.array(["a", "b"])) False >>> is_int64_dtype(np.array([1, 2], dtype=np.int64)) True >>> is_int64_dtype(pd.Index([1, 2.0])) # float False >>> is_int64_dtype(np.array([1, 2], dtype=np.uint32)) # unsigned False
Find elsewhere
🌐
w3resource
w3resource.com › python-exercises › pandas › string › python-pandas-string-exercise-11.php
Pandas: Check whether only numeric values present in a given column of a DataFrame - w3resource
September 9, 2025 - import pandas as pd df = pd.DataFrame({ 'company_code': ['Company','Company a001', '2055', 'abcd', '123345'], 'date_of_sale ': ['12/05/2002','16/02/1999','25/09/1998','12/02/2022','15/09/1997'], 'sale_amount': [12348.5, 233331.2, 22.5, 2566552.0, 23.0]}) print("Original DataFrame:") print(df) print("\nNumeric values present in company_code column:") df['company_code_is_digit'] = list(map(lambda x: x.isdigit(), df['company_code'])) print(df)
🌐
Data Science Parichay
datascienceparichay.com › home › blog › pandas – check if column datatype is numeric
Pandas - Check if column datatype is numeric - Data Science Parichay
November 11, 2022 - You can use the pandas is_numeric_dtype() function to check whether the column values are of numeric dtype or not.
🌐
CopyProgramming
copyprogramming.com › howto › check-whether-a-column-in-a-dataframe-is-an-integer-or-not-and-perform-operation
Pandas: Validate the integer type of a column in a dataframe and execute a corresponding operation
August 3, 2023 - If it is an integer, it is multiplied by 10. import numpy as np import pandas as pd df = pd.dataframe(....) #function to check and multiply if a column is integer def xtimes(x): for col in x: if type(x[col]) == np.int64: return x[col]*10 else: return x[col] #using apply to apply that function ...
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.api.types.is_number.html
pandas.api.types.is_number — pandas 3.0.1 documentation
pandas.api.types.is_number(obj)[source]# Check if the object is a number. Returns True when the object is a number, and False if is not. Parameters: objany type · The object to check if is a number. Returns: bool · Whether obj is a number or not. See also · api.types.is_integer ·
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.api.types.is_number.html
pandas.api.types.is_number — pandas 2.3.3 documentation
pandas.api.types.is_number(obj)[source]# Check if the object is a number. Returns True when the object is a number, and False if is not. Parameters: objany type · The object to check if is a number. Returns: bool · Whether obj is a number or not. See also · api.types.is_integer ·
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.api.types.is_integer.html
pandas.api.types.is_integer — pandas 3.0.1 documentation
It returns True if the object is an integer, and False otherwise. ... The object to check for integer type.
Top answer
1 of 6
43

You can check that using to_numeric and coercing errors:

pd.to_numeric(df['column'], errors='coerce').notnull().all()

For all columns, you can iterate through columns or just use apply

df.apply(lambda s: pd.to_numeric(s, errors='coerce').notnull().all())

E.g.

df = pd.DataFrame({'col' : [1,2, 10, np.nan, 'a'], 
                   'col2': ['a', 10, 30, 40 ,50],
                   'col3': [1,2,3,4,5.0]})

Outputs

col     False
col2    False
col3     True
dtype: bool
2 of 6
11

You can draw a True / False comparison using isnumeric()

Example:

 >>> df
       A      B
0      1      1
1    NaN      6
2    NaN    NaN
3      2      2
4    NaN    NaN
5      4      4
6   some   some
7  value  other

Results:

>>> df.A.str.isnumeric()
0     True
1      NaN
2      NaN
3     True
4      NaN
5     True
6    False
7    False
Name: A, dtype: object

# df.B.str.isnumeric()

with apply() method which seems more robust in case you need corner to corner comparison:

DataFrame having two different columns one with mixed type another with numbers only for test:

>>> df
       A   B
0      1   1
1    NaN   6
2    NaN  33
3      2   2
4    NaN  22
5      4   4
6   some  66
7  value  11

Result:

>>> df.apply(lambda x: x.str.isnumeric())
       A     B
0   True  True
1    NaN  True
2    NaN  True
3   True  True
4    NaN  True
5   True  True
6  False  True
7  False  True

Another example:

Let's consider the below dataframe with different data-types as follows..

>>> df
   num  rating    name  age
0    0    80.0  shakir   33
1    1   -22.0   rafiq   37
2    2   -10.0     dev   36
3  num     1.0   suraj   30

Based on the comment from OP on this answer, where it has negative value and 0's in it.

1- This is a pseudo-internal method to return only the numeric type data.

>>> df._get_numeric_data()
   rating  age
0    80.0   33
1   -22.0   37
2   -10.0   36
3     1.0   30

OR

2- there is an option to use method select_dtypes in module pandas.core.frame which return a subset of the DataFrame's columns based on the column dtypes. One can use Parameters with include, exclude options.

>>> df.select_dtypes(include=['int64','float64']) # choosing int & float
   rating  age
0    80.0   33
1   -22.0   37
2   -10.0   36
3     1.0   30

>>> df.select_dtypes(include=['int64'])  # choose int
   age
0   33
1   37
2   36
3   30
🌐
CopyProgramming
copyprogramming.com › howto › check-if-values-in-pandas-dataframe-column-is-integer-and-write-it-to-a-list-if-not
Pandas Check If String Can Be Integer: Complete Guide for 2026
November 12, 2025 - For most data validation tasks in pandas, stick with str.isdigit() for positive integers or pd.to_numeric() for comprehensive conversion. If you want to check whether an entire column's data type is integer (rather than checking individual values), use the pandas.api.types module: