Skip to content

Commit 4ef18d0

Browse files
authored
Pandas deprecations (#2600)
* test_sodapro.py: use ME instead of M * acis.py: use mask instead of replace
1 parent 03fb340 commit 4ef18d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pvlib/iotools/acis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ def get_acis_station_data(station, start, end, trace_val=0.001,
413413
'climdiv,valid_daterange,tzo,network')
414414
}
415415
df, metadata = _get_acis(start, end, params, map_variables, url, **kwargs)
416-
df = df.replace("M", np.nan)
417-
df = df.replace("T", trace_val)
416+
df = df.mask(df == 'M', np.nan)
417+
df = df.mask(df == 'T', trace_val)
418418
df = df.astype(float)
419419
return df, metadata
420420

tests/iotools/test_sodapro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
index_verbose = pd.date_range('2020-06-01 12', periods=4, freq='1min',
2323
tz='UTC')
24-
index_monthly = pd.date_range('2020-01-01', periods=4, freq='1M')
24+
index_monthly = pd.date_range('2020-01-01', periods=4, freq='1ME')
2525

2626

2727
dtypes_mcclear_verbose = [

0 commit comments

Comments
 (0)