ecg-diagnosis
ecg-diagnosis copied to clipboard
Error in preprocess.py
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 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.
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