推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
yellowtail
V2EX  ›  Python

请帮忙看一下 dataframe 内日期文件通过 json 存入 mongodb 再以列表取出后日期无法正确显示的问题,谢谢!

  •  
  •   yellowtail · Mar 17, 2019 · 2069 views
    This topic created in 2749 days ago, the information mentioned may be changed or developed.

    https://s2.ax1x.com/2019/03/17/AerKbR.png

    内容如图,也尝试过取出以后再用一次 pd.to_datetime

    结果还是不对,猴猴烦

    brickyang
        2
    brickyang  
       Mar 17, 2019 via iPhone   ❤️ 1
    看起来 MongoDB 取出的是毫秒时间戳。pd.to_datetime 可以转成 Datetime 或其他格式: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html

    你说的不对是指?
    yellowtail
        3
    yellowtail  
    OP
       Mar 18, 2019
    @brickyang 掉坑了,应该是 mongodb 里头数据复写出的问题,已解决。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   998 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 90ms · UTC 18:32 · PVG 02:32 · LAX 11:32 · JFK 14:32
    ♥ Do have faith in what you're doing.