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(
{"country": ["US", "AT"],
"lat": [40.7128, 47.8095],
"long": [-74.0060, 13.0550]},
column_metadata={"lat": {"data_category": "Latitude"}, "long": {"data_category": "Longitude"}},
)
df_geo = df.to_geopandas(lat_col="lat", long_col="long")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/microsoft/semantic-link-functions",
"name": "semantic-link-functions-geopandas",
"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 {\"country\": [\"US\", \"AT\"],\n \"lat\": [40.7128, 47.8095],\n \"long\": [-74.0060, 13.0550]},\n column_metadata={\"lat\": {\"data_category\": \"Latitude\"}, \"long\": {\"data_category\": \"Longitude\"}},\n)\n\ndf_geo = df.to_geopandas(lat_col=\"lat\", long_col=\"long\")\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Semantic link functions for Geopandas. Enables conversion of a FabricDataFrame to a GeoDataFrame.",
"version": "0.9.1",
"project_urls": {
"Homepage": "https://github.com/microsoft/semantic-link-functions"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c65c0cd84153ef8ae7093ddcef9b3e7680cf42b21b860dee8e3d608e25db3514",
"md5": "3e4839e6bf4a87be99265f5b03cde71c",
"sha256": "d82c9b519481574262ccb34d573ce8aa3f061af7b9af8e64352b299d9785c4b9"
},
"downloads": -1,
"filename": "semantic_link_functions_geopandas-0.9.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e4839e6bf4a87be99265f5b03cde71c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3955,
"upload_time": "2025-02-26T08:43:21",
"upload_time_iso_8601": "2025-02-26T08:43:21.552719Z",
"url": "https://files.pythonhosted.org/packages/c6/5c/0cd84153ef8ae7093ddcef9b3e7680cf42b21b860dee8e3d608e25db3514/semantic_link_functions_geopandas-0.9.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-26 08:43:21",
"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-geopandas"
}