Skip to content

Commit

Permalink
Address deprecation warning for pd.read_csv squeeze arg
Browse files Browse the repository at this point in the history
  • Loading branch information
bccheung committed Feb 25, 2022
1 parent 857c52a commit 18c2e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion balsa/routines/io/nwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 18c2e0d

Please sign in to comment.