{"id":6449,"library":"semantic-link-functions-geopandas","title":"Semantic Link Functions for Geopandas","description":"Semantic link functions for Geopandas enables conversion of a FabricDataFrame to a GeoDataFrame. This package is part of the broader Microsoft Fabric Semantic Link ecosystem, which facilitates connecting Power BI datasets with Synapse Data Science. It is actively maintained, with new versions often released in conjunction with other `semantic-link` packages.","status":"active","version":"0.14.0","language":"en","source_language":"en","source_url":"https://github.com/microsoft/semantic-link-functions","tags":["geospatial","data-wrangling","pandas","geopandas","semantic-link","microsoft-fabric","power-bi"],"install":[{"cmd":"pip install semantic-link-functions-geopandas","lang":"bash","label":"Install specific package"},{"cmd":"pip install semantic-link","lang":"bash","label":"Install meta-package (includes geopandas functions)"}],"dependencies":[{"reason":"Provides the core GeoDataFrame functionality and geospatial data structures.","package":"geopandas","optional":false},{"reason":"Provides the FabricDataFrame from `sempy.fabric`, which is the base for conversion to GeoDataFrame.","package":"semantic-link-sempy","optional":false}],"imports":[{"symbol":"FabricDataFrame","correct":"from sempy.fabric import FabricDataFrame"}],"quickstart":{"code":"import pandas as pd\nfrom sempy.fabric import FabricDataFrame\n\n# Example FabricDataFrame (usually obtained from a Power BI dataset in Fabric)\ndf = FabricDataFrame(\n    {\n        \"country\": [\"US\", \"AT\"],\n        \"lat\": [40.7128, 47.8095],\n        \"long\": [-74.0060, 13.0550]\n    },\n    column_metadata={\n        \"lat\": {\"data_category\": \"Latitude\"},\n        \"long\": {\"data_category\": \"Longitude\"}\n    },\n    pd_dataframe=pd.DataFrame()\n)\n\n# Convert to GeoDataFrame\ndf_geo = df.to_geopandas(lat_col=\"lat\", long_col=\"long\")\n\nprint(df_geo.head())\nprint(df_geo.geometry.name)","lang":"python","description":"Creates a sample FabricDataFrame with latitude and longitude, then converts it into a GeoDataFrame using the `to_geopandas` semantic function. This demonstrates the core functionality of mapping semantic columns to a geospatial object."},"warnings":[{"fix":"Downgrade `pandas` to a version less than 3.0 (e.g., `pip install 'pandas<3.0'`) or ensure you are using a patched `semantic-link` version if available. Alternatively, install `semantic-link-sempy` directly instead of the `semantic-link` meta-package.","message":"Installing `semantic-link` (and thus implicitly `semantic-link-functions-geopandas`) with `pandas >= 3.0` can cause runtime errors due to breaking changes in Pandas' internal API. Microsoft is actively working on a fix.","severity":"breaking","affected_versions":"semantic-link < 0.14.0 (and dependent packages) when used with pandas >= 3.0"},{"fix":"For full functionality and integration, use this library within a Microsoft Fabric workspace. Local usage will lack direct connectivity to Power BI semantic models.","message":"The full Semantic Link feature set, including the semantic functions and `FabricDataFrame`'s capabilities, is primarily designed and supported for use within Microsoft Fabric notebooks and environments. While the Python packages can be installed locally, their full integration with Power BI semantic models is specific to the Fabric platform.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the `geopandas` changelog for specific deprecation details and migration paths. Update your `geopandas`-specific code to use the modern API calls.","message":"The underlying `geopandas` library has enforced several deprecations in recent major versions (e.g., `geopandas.datasets` module removed, `geopandas.io.read_file` deprecated in favor of `geopandas.read_file`). Users migrating or updating `geopandas` versions independently of `semantic-link-functions-geopandas` should be aware of these changes.","severity":"deprecated","affected_versions":"geopandas >= 1.0 (upstream dependency)"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}