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.

ZeroDivisionError: float division by zero

See original GitHub issue

General

  • Operating System: windows 11
  • Python version: 3.8.3
  • Pandas version: 1.4.2
  • Pandarallel version: 1.6.1

Acknowledgement

  • My issue is NOT present when using pandas without alone (without pandarallel)
  • If I am on Windows, I read the Troubleshooting page before writing a new bug report

Bug description

WARNING: You are on Windows. If you detect any issue with pandarallel, be sure you checked out the Troubleshooting page: 0.99% | 46 / 4628 | 0.00% | 0 / 4627 | multiprocessing.pool.RemoteTraceback: “”" Traceback (most recent call last): File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\multiprocessing\pool.py”, line 125, in worker result = (True, func(*args, **kwds)) File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\multiprocessing\pool.py”, line 51, in starmapstar return list(itertools.starmap(args[0], args[1])) File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\core.py”, line 158, in call results = self.work_function( File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\data_types\series.py”, line 26, in work return data.apply( File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\series.py”, line 4433, in apply return SeriesApply(self, func, convert_dtype, args, kwargs).apply() File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\apply.py”, line 1082, in apply return self.apply_standard() File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandas\core\apply.py”, line 1137, in apply_standard mapped = lib.map_infer( File “pandas_libs\lib.pyx”, line 2870, in pandas._libs.lib.map_infer File “D:\Users\yh110\Anaconda3\envs\22_esci\lib\site-packages\pandarallel\progress_bars.py”, line 206, in closure state.next_put_iteration += max(int((delta_i / delta_t) * 0.25), 1) ZeroDivisionError: float division by zero

Observed behavior

Write here the observed behavior

Expected behavior

Write here the expected behavior

Minimal but working code sample to ease bug fix for pandarallel team

Write here the minimal code sample to ease bug fix for pandarallel team

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:8

github_iconTop GitHub Comments

3reactions
felixsc1commented, Jun 29, 2022

same problem here, one of the progress bars turns red at some percentage point (different every time) and stops progressing, then after the others complete, I get the division by zero error. It DOESN’T happen with progress_bar=False (im using python 3.9.0, windows10 running it in vscode)

1reaction
theGreen-Codercommented, Nov 11, 2022

Oops. Yeah, sorry I thought this was on diffxpy. My bad.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ZeroDivisionError: float division by zero in Python | bobbyhadz
The Python "ZeroDivisionError: float division by zero" occurs when we try to divide a floating-point number by 0 . To solve the error,...
Read more >
Get ZeroDivisionError: float division in python - Stack Overflow
You are dividing two integers, so python is using integer division. In integer division, the quotient is rounded down. For example, 364/365 ...
Read more >
ZeroDivisionError: division by zero - Net-Informations.Com
ZeroDivisionError is a built-in Python exception thrown when a number is divided by 0. This means that the exception raised when the second...
Read more >
ZeroDivisionError: division by zero - Yawin Tutor
ZeroDivisionError occurs when a number is divided by a zero. In Mathematics, when a number is divided by a zero, the result is...
Read more >
Python error ZeroDivisionError float division by zero - Edureka
In the above line the denominator becomes zero. A float number cannot be devided by zero. In this case the express is divided...
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