question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OverflowError: Overflow in int64 addition

See original GitHub issue

Hello, I just start testing this work. Just by runing the first command : python3 -m mimic3benchmark.scripts.extract_subjects …/houssem/data data/root , I found this issue :

raise OverflowError("Overflow in int64 addition")
OverflowError: Overflow in int64 addition

which is caused by this instruction in mimic3csv.py :

stays['AGE'] = (stays.INTIME - stays.DOB).apply(lambda s: s / np.timedelta64(1, 's')) / 60./60/24/365

can you please explain to me the cause of this error

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

6reactions
raquelaokicommented, Sep 24, 2020

Pandas version ‘1.1.2’ also has the same error. The following suggested here works:

df[‘date_of_admission’] = pd.to_datetime(df[‘date_of_admission’]).dt.date df[‘DOB’] = pd.to_datetime(df[‘DOB’]).dt.date df[‘age’] = df.apply(lambda e: (e[‘date_of_admission’] - e[‘DOB’]).days/365, axis=1)

3reactions
ElAbedHoussemcommented, Oct 30, 2019

this issue was caused by pandas version . by using pandas==0.20.3 this issue was fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix OverflowError: Overflow in int64 addition
1 · @bilal first convert them in date format using pd. · i tried it as follows: df[date_of_admission'] = pd. · Kindly share...
Read more >
Failed to train : <type 'exceptions.OverflowError'> : Overflow in ...
Failed to train : <type 'exceptions.OverflowError'> : Overflow in int64 addition ... I get this error when I try to train a model....
Read more >
OverflowError: overflow in int64 addition pandas
Just like most other programming languages, the OverflowError in Python indicates that an arithmetic operation has exceeded the limits of the ...
Read more >
Python OverflowError | Working of Overflow Error in ... - eduCBA
In Python, OverflowError occurs when any operations like arithmetic operations or any other variable storing any value above its limit then there occurs...
Read more >
MIMIC-III 数据集处理| OverflowError: Overflow in int64 addition ...
由入院时间减去出生时间计算入院时年龄,遇到报错:OverflowError: Overflow in int64 addition。查看了一下本地的pandas 版本为1.3.5 ,如下所示:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found