meteostat.monthly
On this page
Get monthly weather data for a specific station or location.
- Type: Function
- Source Code: GitHub
Parameters#
| Parameter | Description | Data Type | Default Value |
|---|---|---|---|
station |
Weather station(s) or geographical point(s). | str, Station, Point, List[str], List[Station], List[Point], DataFrame |
Required |
start |
Start date of the desired period. | datetime, date or None |
None |
end |
End date of the desired period. | datetime, date or None |
None |
parameters |
Requested meteorological parameters. | List[Parameter] |
Default parameters |
providers |
Requested data providers. | List[Provider] |
[Provider.MONTHLY] |
Returns#
Example#
Python
# Import Meteostat library and dependencies
from datetime import date
import meteostat as ms
# Set time period
start = date(2000, 1, 1)
end = date(2018, 12, 31)
# Get monthly data
ts = ms.monthly(ms.Station(id='10637'), start, end)
df = ts.fetch()
# Print DataFrame
print(df)