GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

Pandas deprecation warning in L0 data file loading #127

Closed PennyHow closed 10 months ago

PennyHow commented 1 year ago

Loading older L0 data file types produces a deprecation warning with pandas v1.5.0.

https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/c5613a942d7e79089865f4f5837313bf6abe3461/src/pypromice/process/aws.py#L327-L333

aws.py:328: FutureWarning: 
        Use pd.to_datetime instead.

It is likely that it is related to the date_parser argument, which calls upon our date parser function here:

https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/c5613a942d7e79089865f4f5837313bf6abe3461/src/pypromice/process/aws.py#L841-L842

This deprecation warning can be recreated with these test files, QAS_L.zip, and the following lines:

from pypromice.process import AWS

config = 'QAS_L.toml'                # File path to config file
in_path = ''                         # Path to folder containing L0 file

aws = AWS(config, in_path)

Either we should find an alternative solution using Pandas v1.5.0, or find a solution with a higher Pandas version.

BaptisteVandecrux commented 10 months ago

Fixed with #172