semantic-link-functions-holidays


Namesemantic-link-functions-holidays JSON
Version 0.9.1 PyPI version JSON
download
home_pagehttps://github.com/microsoft/semantic-link-functions
SummarySemantic link functions for holidays package. Enables enrichment of FabricDataFrame with public holidays.
upload_time2025-02-26 08:43:23
maintainerNone
docs_urlNone
authorMicrosoft
requires_python>=3.10
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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"], "date": ["2023-01-06", "2023-01-06"]},
    column_metadata={"country": {"data_category": "Country"}},
)

df["date"] = pd.to_datetime(df["date"])

holiday_series = df.is_holiday(date_col="date", country_col="country")
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/microsoft/semantic-link-functions",
    "name": "semantic-link-functions-holidays",
    "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\"], \"date\": [\"2023-01-06\", \"2023-01-06\"]},\n    column_metadata={\"country\": {\"data_category\": \"Country\"}},\n)\n\ndf[\"date\"] = pd.to_datetime(df[\"date\"])\n\nholiday_series = df.is_holiday(date_col=\"date\", country_col=\"country\")\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Semantic link functions for holidays package. Enables enrichment of FabricDataFrame with public holidays.",
    "version": "0.9.1",
    "project_urls": {
        "Homepage": "https://github.com/microsoft/semantic-link-functions"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b256f9e4c9f176fe1f8997eade7095f7b3c9d54fce2be619269f2e3995584072",
                "md5": "c4e37e35d33d0c4b567d8c4147dcf900",
                "sha256": "d50d7bd927be28793e9fc2f80c99192301492e1c6cf0dacf4b18e4db89eea49c"
            },
            "downloads": -1,
            "filename": "semantic_link_functions_holidays-0.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c4e37e35d33d0c4b567d8c4147dcf900",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4212,
            "upload_time": "2025-02-26T08:43:23",
            "upload_time_iso_8601": "2025-02-26T08:43:23.317348Z",
            "url": "https://files.pythonhosted.org/packages/b2/56/f9e4c9f176fe1f8997eade7095f7b3c9d54fce2be619269f2e3995584072/semantic_link_functions_holidays-0.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-26 08:43:23",
    "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-holidays"
}
        
Elapsed time: 2.94266s