久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='t75Ww'></bdo><ul id='t75Ww'></ul>
    <tfoot id='t75Ww'></tfoot>

  1. <i id='t75Ww'><tr id='t75Ww'><dt id='t75Ww'><q id='t75Ww'><span id='t75Ww'><b id='t75Ww'><form id='t75Ww'><ins id='t75Ww'></ins><ul id='t75Ww'></ul><sub id='t75Ww'></sub></form><legend id='t75Ww'></legend><bdo id='t75Ww'><pre id='t75Ww'><center id='t75Ww'></center></pre></bdo></b><th id='t75Ww'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='t75Ww'><tfoot id='t75Ww'></tfoot><dl id='t75Ww'><fieldset id='t75Ww'></fieldset></dl></div>
    <legend id='t75Ww'><style id='t75Ww'><dir id='t75Ww'><q id='t75Ww'></q></dir></style></legend>

    <small id='t75Ww'></small><noframes id='t75Ww'>

    1. Python:降低精度 pandas 時間戳數據幀

      Python: reduce precision pandas timestamp dataframe(Python:降低精度 pandas 時間戳數據幀)
      <tfoot id='1eMn7'></tfoot>
        <tbody id='1eMn7'></tbody>

        • <bdo id='1eMn7'></bdo><ul id='1eMn7'></ul>
          <legend id='1eMn7'><style id='1eMn7'><dir id='1eMn7'><q id='1eMn7'></q></dir></style></legend>

          <small id='1eMn7'></small><noframes id='1eMn7'>

                <i id='1eMn7'><tr id='1eMn7'><dt id='1eMn7'><q id='1eMn7'><span id='1eMn7'><b id='1eMn7'><form id='1eMn7'><ins id='1eMn7'></ins><ul id='1eMn7'></ul><sub id='1eMn7'></sub></form><legend id='1eMn7'></legend><bdo id='1eMn7'><pre id='1eMn7'><center id='1eMn7'></center></pre></bdo></b><th id='1eMn7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='1eMn7'><tfoot id='1eMn7'></tfoot><dl id='1eMn7'><fieldset id='1eMn7'></fieldset></dl></div>

              • 本文介紹了Python:降低精度 pandas 時間戳數據幀的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                您好,我有以下數據框

                df = 
                
                       Record_ID       Time
                        94704   2014-03-10 07:19:19.647342
                        94705   2014-03-10 07:21:44.479363
                        94706   2014-03-10 07:21:45.479581
                        94707   2014-03-10 07:21:54.481588
                        94708   2014-03-10 07:21:55.481804
                

                有可能有以下嗎?

                df1 = 
                
                       Record_ID       Time
                        94704   2014-03-10 07:19:19
                        94705   2014-03-10 07:21:44
                        94706   2014-03-10 07:21:45
                        94707   2014-03-10 07:21:54
                        94708   2014-03-10 07:21:55
                

                推薦答案

                你可以轉換底層 datetime64[ns] 值使用 astype 轉換為 datetime64[s] 值:

                You could convert the underlying datetime64[ns] values to datetime64[s] values using astype:

                In [11]: df['Time'] = df['Time'].astype('datetime64[s]')
                
                In [12]: df
                Out[12]: 
                   Record_ID                Time
                0      94704 2014-03-10 07:19:19
                1      94705 2014-03-10 07:21:44
                2      94706 2014-03-10 07:21:45
                3      94707 2014-03-10 07:21:54
                4      94708 2014-03-10 07:21:55
                

                請注意,由于 Pandas 系列和 DataFrames 將所有日期時間值存儲為 datetime64[ns] 這些 datetime64[s] 值會自動轉換回 datetime64[ns],因此最終結果仍存儲為 datetime64[ns] 值,但對 astype 的調用會導致秒的小數部分被刪除.

                Note that since Pandas Series and DataFrames store all datetime values as datetime64[ns] these datetime64[s] values are automatically converted back to datetime64[ns], so the end result is still stored as datetime64[ns] values, but the call to astype causes the fractional part of the seconds to be removed.

                如果您希望有一個 datetime64[s] 值的 NumPy 數組,您可以使用 df['Time'].values.astype('datetime64[s]').

                If you wish to have a NumPy array of datetime64[s] values, you could use df['Time'].values.astype('datetime64[s]').

                這篇關于Python:降低精度 pandas 時間戳數據幀的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                How to refresh sys.path?(如何刷新 sys.path?)
                Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                  • <legend id='7hq1M'><style id='7hq1M'><dir id='7hq1M'><q id='7hq1M'></q></dir></style></legend>

                    <small id='7hq1M'></small><noframes id='7hq1M'>

                      <tbody id='7hq1M'></tbody>

                    • <bdo id='7hq1M'></bdo><ul id='7hq1M'></ul>
                      <tfoot id='7hq1M'></tfoot>

                      1. <i id='7hq1M'><tr id='7hq1M'><dt id='7hq1M'><q id='7hq1M'><span id='7hq1M'><b id='7hq1M'><form id='7hq1M'><ins id='7hq1M'></ins><ul id='7hq1M'></ul><sub id='7hq1M'></sub></form><legend id='7hq1M'></legend><bdo id='7hq1M'><pre id='7hq1M'><center id='7hq1M'></center></pre></bdo></b><th id='7hq1M'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7hq1M'><tfoot id='7hq1M'></tfoot><dl id='7hq1M'><fieldset id='7hq1M'></fieldset></dl></div>
                          主站蜘蛛池模板: 一区欧美 | 日本污视频 | 国产成人精品一区二区三区在线 | 日本电影一区二区 | 日韩一区精品 | 91精品国产一区二区三区动漫 | 毛片免费视频 | 高清欧美性猛交xxxx黑人猛交 | 看av片网站| 日韩av一区二区在线观看 | 亚洲综合久久久 | 亚洲视频在线免费观看 | 久久综合久色欧美综合狠狠 | 国产一级特黄aaa大片评分 | 亚洲欧美日韩国产综合 | 亚洲精品中文字幕在线 | 亚洲二区在线 | 日韩视频中文字幕 | 天天操夜夜看 | 国产免费国产 | 日韩免费高清视频 | 视频一区二区在线 | 日韩免费一区 | 欧美福利影院 | 伊人久久伊人 | 日日夜夜视频 | 一级做a | 高清欧美性猛交 | 国产黄色大片 | 国产精品一二区 | 超碰人人在线 | 久热国产在线 | 亚洲精品久久久一区二区三区 | 99久久国产综合精品麻豆 | 国产亚洲一区二区三区在线观看 | 亚洲综合色视频在线观看 | 一区二区三区小视频 | 成人欧美一区二区三区黑人孕妇 | 亚洲精品在线观看视频 | 日本精品久久久一区二区三区 | 亚洲国产成人av |