Skip to content

LazyColumn.str.isdigit

isdigit

isdigit() -> LazyColumn

Checks if all characters in each string are digits.

Returns:

Name Type Description
LazyColumn LazyColumn

A new LazyColumn of boolean values indicating whether each string contains only digit characters.

Examples:

print(df.head())
#    col1 my_string_column
# 0     1         "123"
# 1     2         "Test123"
# 2     3         "456"
# 3     4         ""
# 4     5         None

df["my_string_column"].str.isdigit()
# [True, False, True, False, None]