semantic-link-functions-holidays


Namesemantic-link-functions-holidays JSON
Version 0.7.3 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_time2024-05-14 10:12:02
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.7.3",
    "project_urls": {
        "Homepage": "https://github.com/microsoft/semantic-link-functions"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3616ab9bfb36213b5643d459ce1e3ae710c229417eabccdd805593214c3dc8f4",
                "md5": "6c1fdc54f6a6aab5831930edac3cec7e",
                "sha256": "b9c822f54dc588e098021596f084479051b7977dc84900899a5ddaad2f915479"
            },
            "downloads": -1,
            "filename": "semantic_link_functions_holidays-0.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c1fdc54f6a6aab5831930edac3cec7e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4212,
            "upload_time": "2024-05-14T10:12:02",
            "upload_time_iso_8601": "2024-05-14T10:12:02.183472Z",
            "url": "https://files.pythonhosted.org/packages/36/16/ab9bfb36213b5643d459ce1e3ae710c229417eabccdd805593214c3dc8f4/semantic_link_functions_holidays-0.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-14 10:12:02",
    "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: 0.26198s