onlyzdd / ecg-diagnosis

Deep learning for 12-lead ECG interpretation
125 stars 35 forks source link

Error in preprocess.py #5

Open renatodeleone opened 3 years ago

renatodeleone commented 3 years ago

dxs = [dx_dict.get(code, '') for code in row['dx'].split(',')]

AttributeError: 'int' object has no attribute 'split'

Any help will be appreciate. Thanks

onlyzdd commented 2 years ago

@renatodeleone Sorry to a late reply. It seems pandas is treating the dx column as int. To solve this problem, you can change it to dxs = [dx_dict.get(code, '') for code in str(row['dx']).split(',')] instead or simply update your pandas to newer versions.

renatodeleone commented 2 years ago

Thanks

Il giorno ven 24 set 2021 alle ore 09:40 Dongdong Zhang < @.***> ha scritto:

@renatodeleone https://github.com/renatodeleone Sorry to a late reply. It seems pandas is treating the dx column as int. To solve this problem, you can change it to dxs = [dx_dict.get(code, '') for code in str(row['dx']).split(',')] instead or simply update your pandas to newer versions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/onlyzdd/ecg-diagnosis/issues/5#issuecomment-926415500, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR3KBIWUZBKAHUHVEL53BDUDQTQPANCNFSM47QHHQ7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Renato