ecg-diagnosis icon indicating copy to clipboard operation
ecg-diagnosis copied to clipboard

Error in preprocess.py

Open renatodeleone opened this issue 3 years ago • 2 comments

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

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

Any help will be appreciate. Thanks

renatodeleone avatar Jun 29 '21 14:06 renatodeleone

@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.

onlyzdd avatar Sep 24 '21 07:09 onlyzdd

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

renatodeleone avatar Sep 24 '21 15:09 renatodeleone