numpy.timedelta64 and openpyxl compatibility

Issue #198 invalid
Brian Levin created an issue

I am working on a project where there is a lot of time delta data. We are using pandas to manipulate the data. It uses openpyxl to write the data out to a spreadsheet. I am running into an issue where when I go to output this data I get a TypeError. I currently convert the data to a string to avoid this issue, but it is less than ideal. Is there a better solution to outputing numpy.timedelta64 in openpyxl?

Comments (7)

  1. CharlieC

    Not sure how to proceed with this. What is the expected output in Excel? We could probably add support for Python's timedelta in openpyxl which could be hopefully be overwritten in Pandas / numpy code.

  2. Brian Levin reporter

    Thank you for getting back to me. I have pinged the Pandas community and I will let you know shortly.

  3. CharlieC

    Python does not support nanoseconds. To do so would involve changing the way openpyxl looks at time (use another library) which would cause headaches for anyone else. It might be possible to revisit this and use numpy if it is available but that would have to come via a pull request.

  4. Log in to comment