meteostat 1.6.6__py3-none-any.whl → 1.6.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
meteostat/__init__.py CHANGED
@@ -12,7 +12,7 @@ The code is licensed under the MIT license.
12
12
  """
13
13
 
14
14
  __appname__ = "meteostat"
15
- __version__ = "1.6.6"
15
+ __version__ = "1.6.8"
16
16
 
17
17
  from .interface.base import Base
18
18
  from .interface.timeseries import TimeSeries
@@ -163,8 +163,8 @@ class Normals(MeteoData):
163
163
  else df
164
164
  )
165
165
 
166
- # None -> NaN
167
- temp._data = temp._data.fillna(np.NaN)
166
+ # None -> nan
167
+ temp._data = temp._data.fillna(np.nan)
168
168
 
169
169
  # Return class instance
170
170
  return temp
@@ -123,7 +123,7 @@ class TimeSeries(MeteoData):
123
123
  (pd.isna(self._data[f"{col_name}_flag"]))
124
124
  | (self._data[f"{col_name}_flag"].str.contains(self._model_flag)),
125
125
  col_name,
126
- ] = np.NaN
126
+ ] = np.nan
127
127
 
128
128
  # Conditionally, remove flags from DataFrame
129
129
  if not self._flags:
@@ -131,7 +131,7 @@ class TimeSeries(MeteoData):
131
131
  map(lambda col_name: f"{col_name}_flag", columns), axis=1, inplace=True
132
132
  )
133
133
 
134
- # Drop NaN-only rows
134
+ # Drop nan-only rows
135
135
  self._data.dropna(how="all", subset=columns, inplace=True)
136
136
 
137
137
  def _init_time_series(
@@ -9,7 +9,7 @@ The code is licensed under the MIT license.
9
9
  """
10
10
 
11
11
  from copy import copy
12
- from numpy import NaN
12
+ from numpy import nan
13
13
  import pandas as pd
14
14
  import pytz
15
15
  from meteostat.core.warn import warn
@@ -56,7 +56,7 @@ def normalize(self):
56
56
  # Add columns
57
57
  for column in temp._columns[temp._first_met_col :]:
58
58
  # Add column to DataFrame
59
- df[column] = NaN
59
+ df[column] = nan
60
60
 
61
61
  result = pd.concat([result, df], axis=0)
62
62
 
@@ -70,8 +70,8 @@ def normalize(self):
70
70
  .first()
71
71
  )
72
72
 
73
- # None -> NaN
74
- temp._data = temp._data.fillna(NaN)
73
+ # None -> nan
74
+ temp._data = temp._data.fillna(nan)
75
75
 
76
76
  # Return class instance
77
77
  return temp
meteostat/units.py CHANGED
@@ -6,7 +6,7 @@ Convert a Pandas Series to any meteorological data unit
6
6
  The code is licensed under the MIT license.
7
7
  """
8
8
 
9
- from numpy import NaN, isnan
9
+ from numpy import nan, isnan
10
10
 
11
11
 
12
12
  def fahrenheit(value):
@@ -62,7 +62,7 @@ def direction(value):
62
62
  Convert degrees to wind direction
63
63
  """
64
64
 
65
- wdir = NaN
65
+ wdir = nan
66
66
 
67
67
  if (337 <= value <= 360) or value <= 23:
68
68
  wdir = "N"
@@ -90,7 +90,7 @@ def condition(value):
90
90
  """
91
91
 
92
92
  if isnan(value) or value < 1 or value > 27:
93
- return NaN
93
+ return nan
94
94
 
95
95
  return [
96
96
  "Clear",
@@ -19,7 +19,7 @@ def weighted_average(step: pd.DataFrame) -> pd.DataFrame:
19
19
 
20
20
  data = np.ma.masked_array(step, np.isnan(step))
21
21
  data = np.ma.average(data, axis=0, weights=data[:, -2])
22
- data = data.filled(np.NaN)
22
+ data = data.filled(np.nan)
23
23
 
24
24
  return pd.DataFrame(data=[data], columns=step.columns)
25
25
 
@@ -30,7 +30,7 @@ def degree_mean(data: pd.Series) -> float:
30
30
  """
31
31
 
32
32
  if data.isnull().all():
33
- return np.NaN
33
+ return np.nan
34
34
 
35
35
  rads = np.deg2rad(data)
36
36
  sums = np.arctan2(np.sum(np.sin(rads)), np.sum(np.cos(rads)))
@@ -52,7 +52,7 @@ def adjust_temp(df: pd.DataFrame, alt: int):
52
52
  # Adjust values for all temperature-like data
53
53
  for col_name in temp_like:
54
54
  if col_name in df.columns:
55
- df.loc[df[col_name] != np.NaN, col_name] = df[col_name] + (
55
+ df.loc[df[col_name] != np.nan, col_name] = df[col_name] + (
56
56
  temp_diff * ((df["elevation"] - alt) / 100)
57
57
  )
58
58
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meteostat
3
- Version: 1.6.6
3
+ Version: 1.6.8
4
4
  Summary: Access and analyze historical weather and climate data with Python.
5
5
  Home-page: https://github.com/meteostat/meteostat-python
6
6
  Author: Meteostat
@@ -17,7 +17,7 @@ Classifier: Topic :: Scientific/Engineering :: Visualization
17
17
  Requires-Python: >=3.6.0
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: pandas <2,>=1.1
20
+ Requires-Dist: pandas >=1.1
21
21
  Requires-Dist: pytz
22
22
  Requires-Dist: numpy
23
23
 
@@ -1,5 +1,5 @@
1
- meteostat/__init__.py,sha256=KmWUm69mwE3IQCNVZHH3YsHNquld1HzFHkNZvR4tfxk,858
2
- meteostat/units.py,sha256=3rePrCjMt39oHcFU01ADdMadC80Txd_jqP7PF6QWnnw,2566
1
+ meteostat/__init__.py,sha256=i7FBljbAnuPixVcLK75nyRF8A8Ki8GpUURWzeniURx4,858
2
+ meteostat/units.py,sha256=G0vh2tYsp0ESGUpg3ZAE0U-b9Ih_oMtPNDZ71Bbq3iE,2566
3
3
  meteostat/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  meteostat/core/cache.py,sha256=ZCBijVA-Zk2FSizLTnkV5hzcL8ecGhOpKURQsWpY0Es,1766
5
5
  meteostat/core/loader.py,sha256=VVIzfYDhvD4JvNpUkEuB_IvQ6-fWddokLP4Qp1DEveQ,2496
@@ -13,10 +13,10 @@ meteostat/interface/hourly.py,sha256=EpPOdld6FJ_OkHd6opiBiO70cPs_mP8oST_Q3Zl36Vo
13
13
  meteostat/interface/interpolate.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  meteostat/interface/meteodata.py,sha256=Ec0MTgfAB6E5cohvrcDZoFwelTj3V4nc0MlQPjSo4uY,7066
15
15
  meteostat/interface/monthly.py,sha256=1P6IdnJ_sooc_-4pfkOPCeMjupd-8UMH4xB1KfMW0RE,2416
16
- meteostat/interface/normals.py,sha256=jYRM-iCi4W0dNFGJgWRSJQmvkqilVHUMQRiM-GHTu44,5518
16
+ meteostat/interface/normals.py,sha256=UVl24IGakuu7Sk-d3DBOtXme4HrMm7aJeJQQzaLlzwM,5518
17
17
  meteostat/interface/point.py,sha256=N755kWXIeLpaNvG4H7Khv0YmDKA86rviybe2C1UK_QA,3804
18
18
  meteostat/interface/stations.py,sha256=xwrtaLFvXWNwDfTGLLIbu4EjCkE54wS4TZZS8K8RdTU,6626
19
- meteostat/interface/timeseries.py,sha256=JeJ3Lc2cMAE4H8gbCSlktWKjV9wY0J4X0Q9n0vd4ONU,6381
19
+ meteostat/interface/timeseries.py,sha256=3Cys1UJUJvsSwIHK0l-ajYGeUq4SS3H6eUu5unSoeJ4,6381
20
20
  meteostat/series/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  meteostat/series/aggregate.py,sha256=xyDwTjFxuX7NRNcaCc31VnYChZ2xP7DnyHDYsvn8nCI,1201
22
22
  meteostat/series/convert.py,sha256=BjVmyDQ_G5ccgOD4vk_2hnX6ShDt6vHEzrWXRnjsUKQ,631
@@ -24,16 +24,16 @@ meteostat/series/count.py,sha256=kV0Oztmy1K0E3Z1h8Na9twxUhujRepRMtGzM_CNInJc,358
24
24
  meteostat/series/coverage.py,sha256=76PlEoVPM_-4Oys-6THggV-7gESbPM6Cx0m1n0-1YcM,534
25
25
  meteostat/series/fetch.py,sha256=MIrkhhtAucThO06Bcc92c6rrc3v5G31VBI0TkQd0oZ0,620
26
26
  meteostat/series/interpolate.py,sha256=EhoOmmAAiv8FcBIZ83hLr1Vu0iJd8BfhYGS4p1b5FOo,925
27
- meteostat/series/normalize.py,sha256=ZfTsKclXxB6FpWBNmTQLB5Zq5riLgT8BT8pMFI6biI0,2155
27
+ meteostat/series/normalize.py,sha256=RZsfFYosKXLI2eTBzrkoSiiSTxqHTbGJOYZo2tBiorc,2155
28
28
  meteostat/series/stations.py,sha256=pHDQR1t7Z7jN5Vaj8wdNnSsZI8s6SiH5bNeTbys3TjA,447
29
29
  meteostat/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- meteostat/utilities/aggregations.py,sha256=yoDPX41FmWKLf0YBAxy4N1boR-bb8hCmkI6Wd4TGZQk,915
30
+ meteostat/utilities/aggregations.py,sha256=-t4ZBNM8cnwnuiR7Bzt7OlUQxNJMZkqS3E4AIMrJg3M,915
31
31
  meteostat/utilities/endpoint.py,sha256=tH2he-lGEBLRDkoLzktQ37aV3QTcmUM69oeHGUUJo0w,785
32
32
  meteostat/utilities/helpers.py,sha256=PFMYQIhXv29Boe_uZpelOZKzK4SzKgWXJbnzacfZreU,787
33
- meteostat/utilities/mutations.py,sha256=_w0RmGkE6HHQBQFPfCIYazpTXD_1x3uJoy0Y1dYllm4,1485
33
+ meteostat/utilities/mutations.py,sha256=wjFQE2JdZ22WwVD-7vKT6aculZ9Z8vAWi9ypz1B9X88,1485
34
34
  meteostat/utilities/validations.py,sha256=MlKY1gkeqmovFr4lR_iM6Bk7yuGdSgy0NGceiqYI7Vs,646
35
- meteostat-1.6.6.dist-info/LICENSE,sha256=kqpl7FVzWOCe11BZqJBZ1aRQi-aK87j3ljtG7P3VxLc,1066
36
- meteostat-1.6.6.dist-info/METADATA,sha256=bsP8I7dk7M_hmUM37_ZTjjb7bcANQ7HLAENfnkrBGCU,4646
37
- meteostat-1.6.6.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
38
- meteostat-1.6.6.dist-info/top_level.txt,sha256=s8LP1xi5iF2zhVv5ULkHwW-tPeMrljxnA8VqZibQqro,10
39
- meteostat-1.6.6.dist-info/RECORD,,
35
+ meteostat-1.6.8.dist-info/LICENSE,sha256=kqpl7FVzWOCe11BZqJBZ1aRQi-aK87j3ljtG7P3VxLc,1066
36
+ meteostat-1.6.8.dist-info/METADATA,sha256=BGX8P_0l4prmUgAPYYxQ57jtUAHCUNP7Z_Yxovr2FZU,4643
37
+ meteostat-1.6.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
38
+ meteostat-1.6.8.dist-info/top_level.txt,sha256=s8LP1xi5iF2zhVv5ULkHwW-tPeMrljxnA8VqZibQqro,10
39
+ meteostat-1.6.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5