Skip to content

Commit

Permalink
Use df.tolist(), not df.to_list().
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Jul 11, 2024
1 parent feb6b0c commit f3d633d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions wfdb/io/convert/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,7 @@ def csv_to_wfdb(
# Check if signal names are valid and set defaults
if not sig_name:
if header:
try:
sig_name = df_CSV.columns.to_list()
except AttributeError:
# to_list() was introduced in Pandas v0.24.0
# https://pandas.pydata.org/pandas-docs/stable/whatsnew/v0.24.0.html#other-api-changes
sig_name = df_CSV.columns.tolist()
sig_name = df_CSV.columns.tolist()
if any(map(str.isdigit, sig_name)):
print(
"WARNING: One or more of your signal names are numbers, this "
Expand Down

0 comments on commit f3d633d

Please sign in to comment.