From 18c2e0d2eb4fb467fb85ca19ef40def450ba8326 Mon Sep 17 00:00:00 2001 From: Brian Cheung Date: Fri, 25 Feb 2022 16:47:05 -0500 Subject: [PATCH] Address deprecation warning for pd.read_csv squeeze arg --- balsa/routines/io/nwp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balsa/routines/io/nwp.py b/balsa/routines/io/nwp.py index dc2ee4b..771333a 100644 --- a/balsa/routines/io/nwp.py +++ b/balsa/routines/io/nwp.py @@ -359,7 +359,7 @@ def read_nwp_transit_station_results(nwp_fp: Union[str, Path], station_line_node raise FileNotFoundError(f'File `{nwp_fp.as_posix()}` not found.') with zipfile.ZipFile(nwp_fp) as zf: - results = pd.read_csv(zf.open('aux_transit_results.csv'), index_col=['i', 'j'], squeeze=True) + results = pd.read_csv(zf.open('aux_transit_results.csv'), index_col=['i', 'j']).squeeze('columns') station_results = pd.DataFrame(index=sorted(station_line_nodes)) station_results.index.name = 'stn_node'