meteostat 1.7.0__py3-none-any.whl → 1.7.2__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.7.0"
15
+ __version__ = "1.7.2"
16
16
 
17
17
  from .interface.base import Base
18
18
  from .interface.timeseries import TimeSeries
@@ -21,7 +21,7 @@ def convert(self, units: dict):
21
21
 
22
22
  # Change data units
23
23
  for parameter, unit in units.items():
24
- if parameter in temp._columns:
24
+ if parameter in temp._processed_columns:
25
25
  temp._data[parameter] = temp._data[parameter].apply(unit)
26
26
 
27
27
  # Return class instance
@@ -34,6 +34,10 @@ def filter_time(
34
34
  # Get time index
35
35
  time = df.index.get_level_values("time")
36
36
 
37
+ # If no time index, return original DataFrame
38
+ if len(time) == 0:
39
+ return df
40
+
37
41
  # Filter & return
38
42
  return df.loc[(time >= start) & (time <= end)] if start and end else df
39
43
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: meteostat
3
- Version: 1.7.0
3
+ Version: 1.7.2
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
@@ -1,4 +1,4 @@
1
- meteostat/__init__.py,sha256=wkvGKIkMyOgM1HqWBY9nQAlsqh3JCuM82Ojz7DUkX8g,989
1
+ meteostat/__init__.py,sha256=UKkWcCwWN__N9k1kfvdLXALFTZtRg2rErFa9XOF42zs,989
2
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=MEC6Hcf2rwg3__zv_Y1nSk16mfdTsrLH9CTraMX7NYw,1764
@@ -19,7 +19,7 @@ meteostat/interface/stations.py,sha256=hC2DmtE24u--lb3jbkFVMkFDKCR-LP5h8uXSOIb4_
19
19
  meteostat/interface/timeseries.py,sha256=tE1ShXADPNnhirL5puZb2KyDq18cWU1HX8XU6J8qp4U,7909
20
20
  meteostat/series/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  meteostat/series/aggregate.py,sha256=dhYx1c2OzOgEcdUNCrmT4zdYY1UuT4PhkWYRirmx7v0,1200
22
- meteostat/series/convert.py,sha256=BjVmyDQ_G5ccgOD4vk_2hnX6ShDt6vHEzrWXRnjsUKQ,631
22
+ meteostat/series/convert.py,sha256=Uu76hw-M1QzwYuliA2hp0Dl9f1YyNaLE3AQTyaask60,641
23
23
  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
@@ -30,10 +30,10 @@ meteostat/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
30
30
  meteostat/utilities/aggregations.py,sha256=-t4ZBNM8cnwnuiR7Bzt7OlUQxNJMZkqS3E4AIMrJg3M,915
31
31
  meteostat/utilities/endpoint.py,sha256=ndHSMGi5LhB1yrjA3f6pDbe-0glnnDAX7IInp0Gscik,806
32
32
  meteostat/utilities/helpers.py,sha256=wt11OXHzIDw3DY98XGIfcrh1bPCC9dClVnNdGtqvz4U,1691
33
- meteostat/utilities/mutations.py,sha256=qT9lJ1IsiEp5CKMN8IiJBdzHGPE80mJv0VBH-z6fkbg,1750
33
+ meteostat/utilities/mutations.py,sha256=7KrTYOqLGUiVPBvN_rml6dZBXMtP2zUhi08yB9Gyr0I,1842
34
34
  meteostat/utilities/validations.py,sha256=MlKY1gkeqmovFr4lR_iM6Bk7yuGdSgy0NGceiqYI7Vs,646
35
- meteostat-1.7.0.dist-info/LICENSE,sha256=kqpl7FVzWOCe11BZqJBZ1aRQi-aK87j3ljtG7P3VxLc,1066
36
- meteostat-1.7.0.dist-info/METADATA,sha256=XlhFJUEt7mmsltKiKzZzL7Z07Pl74jS5LRZOsnOqovs,4633
37
- meteostat-1.7.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
38
- meteostat-1.7.0.dist-info/top_level.txt,sha256=s8LP1xi5iF2zhVv5ULkHwW-tPeMrljxnA8VqZibQqro,10
39
- meteostat-1.7.0.dist-info/RECORD,,
35
+ meteostat-1.7.2.dist-info/LICENSE,sha256=kqpl7FVzWOCe11BZqJBZ1aRQi-aK87j3ljtG7P3VxLc,1066
36
+ meteostat-1.7.2.dist-info/METADATA,sha256=irtRXREpHJboQ0NG_K2-zpWtcfXm1Ep32RKfxbe9oq8,4633
37
+ meteostat-1.7.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
38
+ meteostat-1.7.2.dist-info/top_level.txt,sha256=s8LP1xi5iF2zhVv5ULkHwW-tPeMrljxnA8VqZibQqro,10
39
+ meteostat-1.7.2.dist-info/RECORD,,