nalepae / pandarallel

A simple and efficient tool to parallelize Pandas operations on all available CPUs
https://nalepae.github.io/pandarallel
BSD 3-Clause "New" or "Revised" License
3.65k stars 210 forks source link

cant run on python3.6 #246

Closed BTFKM closed 1 year ago

BTFKM commented 1 year ago

python3.6 not support time.time_ns, and case import error ImportError: cannot import name 'time_ns'

anyway to fix that? or any working version?

BTFKM commented 1 year ago

i googled and copied another way from other python3.6 time_ns issus :D

edited import code:

try:
    from time import time_ns
except ImportError:
    from datetime import datetime
    # For compatibility with Python 3.6
    def time_ns():
        now = datetime.now()
        return int(now.timestamp() * 1e9)
till-m commented 1 year ago

Python 3.6 actually reached EoL a year ago, so we decided against support it. Glad you found a workaround that works for you though!