Registry / data / semantic-link-functions-phonenumbers

semantic-link-functions-phonenumbers

JSON →
library0.14.1pypypiunverified

This library integrates the `phonenumbers` package with Semantic Link, enabling validation and enrichment of phone numbers within Microsoft Fabric DataFrames (FabricDataFrames). It simplifies operations on phone number columns for data quality and analysis, adding columns indicating validity, type, and various formats. The current version is 0.14.0, and it appears to follow the active release cadence of the broader `semantic-link-functions` project.

pip install semantic-link-functions-phonenumbers
INSTALL
IMPORT
SIG · SEMANTIC-LINK-FUNC
S
semantic-link-functions-phonenumbers
datapythonv0.14.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.14.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
4/8 runs
py 3.11
✕ build_error
4/8 runs
py 3.12
✕ build_error
4/8 runs
py 3.13
✕ build_error
4/8 runs
py 3.9
✕ build_error
✕ build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

validate_phone_number
from semantic_link_functions_phonenumbers import validate_phone_number

This quickstart demonstrates how to initialize a `FabricDataFrame` and use `validate_phone_number` to process a column containing phone numbers. The function enriches the DataFrame by adding several new columns with validation results and formatted phone numbers, such as `phone_is_valid` and `phone_e164_format`.

import pandas as pd from sempy.fabric import FabricDataFrame # sempy is a required dependency for FabricDataFrame from semantic_link_functions_phonenumbers import validate_phone_number # In a real Microsoft Fabric environment, a FabricDataFrame # would typically be loaded from a Lakehouse table or similar source. # For demonstration, we create one from a pandas DataFrame. data = {'phone': ['+12065550100', '123-456-7890', 'invalid phone number']} df = FabricDataFrame(pd.DataFrame(data)) # Validate phone numbers in the 'phone' column # The function adds new columns (e.g., '_is_valid', '_number_type', '_e164_format') df_validated = validate_phone_number(df, 'phone') print("Original DataFrame:\n", df) print("\nValidated DataFrame (selected columns):\n") print(df_validated[['phone', 'phone_is_valid', 'phone_number_type', 'phone_e164_format']].head()) # Example of filtering invalid numbers # print(df_validated[~df_validated['phone_is_valid']])
Debug
Known issues
gotchaThis library has peer dependencies on `phonenumbers` (PyPI: `google-i18n-phonenumbers`) and `sempy` which must be installed separately. Failing to install them will result in runtime `ModuleNotFoundError` or similar issues.
fix
Ensure `pip install semantic-link-functions-phonenumbers phonenumbers sempy` is run to cover all dependencies.
affects: All versions
gotchaThe library is primarily designed for use with `FabricDataFrame` within Microsoft Fabric. While it might accept `pandas.DataFrame` in some contexts, full integration, expected performance, and access to Fabric-specific features are achieved when working with `sempy.fabric.FabricDataFrame`.
fix
Use `sempy.fabric.FabricDataFrame` for optimal compatibility and feature utilization, especially in a Microsoft Fabric environment.
affects: All versions
gotchaThe `validate_phone_number` function offers optional parameters like `country_code`, `region_code`, and `strict`. The default validation behavior might not align with specific regional or strictness requirements without explicit configuration, potentially leading to unexpected validation results.
fix
Review the function signature and explicitly pass `country_code`, `region_code`, or `strict=True` to tailor the validation logic to your specific needs.
affects: All versions
Upgrade
Version history
0.14.1latest on PyPI · released Apr 29, 2026
Audit
Dependencies
phonenumbersrequiredProvides the core phone number parsing and validation logic (PyPI: google-i18n-phonenumbers).
sempyrequiredRequired for FabricDataFrame integration and related Semantic Link functionalities within Microsoft Fabric.
pandasrequiredUnderlying DataFrame operations, implicitly required by sempy and FabricDataFrame.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
semantic-link-functions-phonenumbers — pip install semantic-link-functions-phonenumbers · libregistry