soundex_matches¶
In [ ]:
soundex_matches(expr1,
expr2,)
Generates and compares Soundex encodings of two strings and returns the number of the matching characters. The result of a comparison ranges from 0 (zero matches) to 4 (an exact match).
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
expr1 | object | ❌ | Expression. |
expr2 | object | ❌ | Expression. |
In [4]:
from verticapy import *
df = tablesample({"x": ['hello', 'apple', 'heroes', 'allo']}).to_vdf()
display(df)
In [5]:
# Importing the stats module
import verticapy.stats as st
# Applying the week function
df["soundex_matches_x"] = st.soundex_matches(df["x"], 'heyllow')
display(df)
