Semantic link functions for holidays package. Enables enrichment of FabricDataFrame with public holidays.
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"], "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")
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_holidays-0.8.2-py3-none-any.whl
.
File metadata
- Download URL: semantic_link_functions_holidays-0.8.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e111dac901e20f0b7d86b26ae7f60834c888796e0da042ffb0b87457581adb |
|
MD5 | f00836a059e8f471eb2452c689c8792f |
|
BLAKE2b-256 | 651f66fc6332ed8a4762a29e71a11daabc7a08da467b4f376fbfc81fdfe41a2a |