From 6a67d3b5c8c4b892b3fca316bc95949890828d54 Mon Sep 17 00:00:00 2001 From: Mladen Gibanica <11275336+mgcth@users.noreply.github.com> Date: Wed, 27 Mar 2024 07:30:06 +0100 Subject: [PATCH] Fix dataframe parsing bug --- src/smhi/metobs.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/smhi/metobs.py b/src/smhi/metobs.py index a05b19ad..a355d8de 100644 --- a/src/smhi/metobs.py +++ b/src/smhi/metobs.py @@ -358,12 +358,9 @@ def __init__( data_model = self._get_data(model.data) stationdata = data_model.stationdata stationdata = self._clean_columns(stationdata) - stationdata = self._drop_nan(data_model.stationdata) + stationdata = self._drop_nan(stationdata) - if ( - self._has_datetime_columns(data_model.stationdata) is True - and not stationdata.empty - ): + if self._has_datetime_columns(stationdata) is True and not stationdata.empty: stationdata = self._set_dataframe_index(stationdata) self.station = data_model.station