Semantic link functions for Geopandas. Enables conversion of a FabricDataFrame to a GeoDataFrame.
Project 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.
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.
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file semantic_link_functions_geopandas-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: semantic_link_functions_geopandas-0.8.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43e71b1749a62137fa8b6930bf83afbbcd681b36429703eb1f677458dfc33ad |
|
MD5 | 16ef40de15d3c0b120e955072eb81d44 |
|
BLAKE2b-256 | 9c27def659d5768569fb6aa857a15242737dc749509cb2c0adcc539ac1a7e3d2 |