FabricDataFrames dynamically expose semantic functions based on logic defined by each function. For example, the is_holiday function shows up in the autocomplete suggestions when you're working on a FabricDataFrame containing both a datetime column and a country column.
Each semantic function uses information about the data types, metadata (such as Power BI data categories), and the data in a FabricDataFrame or FabricSeries to determine its relevance to the particular data on which you're working.
Semantic functions are automatically discovered when annotated with the @semantic_function decorator. You can think of semantic functions as being similar to C# extension methods applied to the popular DataFrame concept.
```python
from sempy.fabric import FabricDataFrame
df = FabricDataFrame(
{"num": ["+442083661177", "ABC000-0000", "abc"], "country": ["US", "AT", "Unknown"]},
column_metadata={"country": {"data_category": "Country"}},
)
is_phone_series = df.is_phonenumber(col_num="num", col_country="country")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/microsoft/semantic-link-functions",
"name": "semantic-link-functions-phonenumbers",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Microsoft",
"author_email": "semanticdatascience@service.microsoft.com",
"download_url": null,
"platform": "Microsoft Fabric",
"description": "FabricDataFrames dynamically expose semantic functions based on logic defined by each function. For example, the is_holiday function shows up in the autocomplete suggestions when you're working on a FabricDataFrame containing both a datetime column and a country column.\n\nEach semantic function uses information about the data types, metadata (such as Power BI data categories), and the data in a FabricDataFrame or FabricSeries to determine its relevance to the particular data on which you're working.\n\nSemantic functions are automatically discovered when annotated with the @semantic_function decorator. You can think of semantic functions as being similar to C# extension methods applied to the popular DataFrame concept.\n\n```python\nfrom sempy.fabric import FabricDataFrame\n\ndf = FabricDataFrame(\n {\"num\": [\"+442083661177\", \"ABC000-0000\", \"abc\"], \"country\": [\"US\", \"AT\", \"Unknown\"]},\n column_metadata={\"country\": {\"data_category\": \"Country\"}},\n)\n\nis_phone_series = df.is_phonenumber(col_num=\"num\", col_country=\"country\")\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Semantic link functions for phonenumbers package. Enables validation of phone numbers in FabricDataFrames.",
"version": "0.7.3",
"project_urls": {
"Homepage": "https://github.com/microsoft/semantic-link-functions"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e05c0fe1b1ce9c1ddd896b998d5332286b0c211d8a99ea3087da698e878e62bc",
"md5": "68498b8345a8faa7cea89005f95dfc26",
"sha256": "1ebf00c4247fb701d1d215b4dcfa591a18ab577a43a6e19a8ae6d2202c9f050f"
},
"downloads": -1,
"filename": "semantic_link_functions_phonenumbers-0.7.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "68498b8345a8faa7cea89005f95dfc26",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 4316,
"upload_time": "2024-05-14T10:12:05",
"upload_time_iso_8601": "2024-05-14T10:12:05.783469Z",
"url": "https://files.pythonhosted.org/packages/e0/5c/0fe1b1ce9c1ddd896b998d5332286b0c211d8a99ea3087da698e878e62bc/semantic_link_functions_phonenumbers-0.7.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-14 10:12:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "microsoft",
"github_project": "semantic-link-functions",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "semantic-link-functions-phonenumbers"
}