Strip timezone info in pandas

前端 未结 5 1447
一生所求
一生所求 2020-12-09 17:04

I have been struggling with removing the time zone info from a column in a pandas dataframe. I have checked the following question, but it does not work for me:

Can

5条回答
  •  悲哀的现实
    2020-12-09 17:07

    If it is always the last 6 characters that you want to ignore, you may simply slice your current string:

    >>> '2015-12-01 00:00:00-06:00'[0:-6]
    '2015-12-01 00:00:00'
    

提交回复
热议问题