Semantic link functions for meteostat package. Enables enrichment of FabricDataFrame with historical weather data.
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({
"lat": [40.7128, 47.8095, 47.8095, 47.8095],
"long": [-74.0060, 13.0550, 13.0550, 13.0550],
"date": ["2023-01-06", "2023-01-06", "2023-01-07", "2023-01-10"]
},
column_metadata={"lat": {"data_category": "Latitude"}, "long": {"data_category": "Longitude"}},
)
df["date"] = pd.to_datetime(df["date"])
df_weather = df.add_weather_meteostat("lat", "long", "date")
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_meteostat-0.7.4-py3-none-any.whl
.
File metadata
- Download URL: semantic_link_functions_meteostat-0.7.4-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 870927c5da0837d9095a55e7a5e00f4119c1698976215b12cf2ff67c7822d056 |
|
MD5 | 46f9327d3e5cc256f0972645a43d1553 |
|
BLAKE2b-256 | d1c315e3e967c7f1cfd4eaa1ea797dedc55ba3f078740929b0d63558ec1c96da |