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.7.3",
"project_urls": {
"Homepage": "https://github.com/microsoft/semantic-link-functions"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "99b0dfc1b80e24e9bbf28bd16b89c8d83964cc619ea88708c5cd232d20c18afe",
"md5": "c1a94d248aa67c1f7a549acebdf31155",
"sha256": "c377564595288ee89641804485b00148ebd2861e9dff002813429f2b2f775784"
},
"downloads": -1,
"filename": "semantic_link_functions_geopandas-0.7.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c1a94d248aa67c1f7a549acebdf31155",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3953,
"upload_time": "2024-05-14T10:12:00",
"upload_time_iso_8601": "2024-05-14T10:12:00.090914Z",
"url": "https://files.pythonhosted.org/packages/99/b0/dfc1b80e24e9bbf28bd16b89c8d83964cc619ea88708c5cd232d20c18afe/semantic_link_functions_geopandas-0.7.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-14 10:12:00",
"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"
}