I read Pandas change timezone for forex DataFrame but I\'d like to make the time column of my dataframe timezone naive for interoperability with an sqlite3 database.
The column must be a datetime
dtype, as from using pd.to_datetime, then you can use tz_localize to change the time zone, a naïve timestamp corresponds to time zone None
:
testdata['time'].dt.tz_localize(None)
Unless the column is an index (DatetimeIndex), the .dt accessor must be used to access pandas datetime functions.