Responsive Ad Area

Share This Post

test

Localise pandas timestamps with no DST transistion

I’m trying to import CSV data from a file produced by a device which has a system clock which is set to 'Australia/Adelaide' time, but doesn’t switch from standard to daylight time in summer. I can import it no problem as tz-naive but I need to correlate it with data which is tz-aware.

The following is incorrect as it assumes the data transitions to summer time on ‘2017-10-01’

consumption = pd.read_csv('~/dev/datasets/data.csv', parse_dates=['timestamp'], index_col=['timestamp'])
consumption.index.tz_localize('Australia/Adelaide')

tz_localize contains a number of arguments to deal with ambiguous dates – but I don’t see any way to tell it that the data doesn’t transition at all. Is there a way to specify a “custom” timezone that’s 'Australia/Adelaide', no daylight savings?


Localise pandas timestamps with no DST transistion
Localise pandas timestamps with no DST transistion
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar