WEBVTT

00:01.060 --> 00:06.440
In the last video we have localized our stock price time series to New York time.

00:06.760 --> 00:14.230
So here we can see that New York Time is a four hours behind UTC time and we can also check this here

00:14.860 --> 00:18.320
with the index attribute tea set.

00:18.400 --> 00:20.670
So this is New York time.

00:21.140 --> 00:26.830
And let's assume that you want to convert these New York Times to L.A. time because we are located in

00:26.830 --> 00:31.030
L.A. and frequently trade in the cheese stock or whatever.

00:31.030 --> 00:37.690
And actually we can convert two other time zones with the method the tea set convert and it's actually

00:37.690 --> 00:41.340
required that we have localized our time series before.

00:41.590 --> 00:45.290
So if you haven't localized that we cannot convert it.

00:45.310 --> 00:50.890
So first of all we can convert our New York Time to UTC bypassing here UTC

00:53.790 --> 01:02.880
and here we have the corresponding UTC time so 10:00 a.m. New York is uh 2:00 p.m. UTC time and also

01:02.880 --> 01:10.110
here we have the difference to UTC time and of course that's uh 0 and let's convert our New York Time

01:10.110 --> 01:18.200
to Los ángeles time bypassing America Los Angeles so apparently Los Angeles Times.

01:18.220 --> 01:24.300
Three hours behind the New York time and seven hours behind UTC time.

01:24.490 --> 01:30.040
So 10:00 a.m. New York is actually corresponding to a 7:00 a.m. Los Angeles time.

01:30.040 --> 01:36.580
And also here if you want to save our new time zone and actually change our data frame we have to assign

01:36.580 --> 01:39.350
it to a variable and the.

01:39.370 --> 01:49.700
For example we can assign here our cheap price data frame with Los Angeles Time to the variable to L.A..

01:49.770 --> 01:54.150
So now we have two data frames for our two year data set.

01:54.150 --> 01:57.540
So we have it in L.A. time and also New York time

02:00.260 --> 02:07.440
and now let's assume that we want to concatenate both data frames horizontally and we can do this with

02:07.530 --> 02:09.700
the direct pen us method Comcare.

02:09.750 --> 02:14.520
And we pass the G and the G L.A. data frame.

02:14.730 --> 02:21.360
And the interesting question is now how will the rows and the timestamps be aligned in the concatenated

02:21.360 --> 02:22.590
data frame.

02:22.740 --> 02:24.180
And let's simply have a look here.

02:24.180 --> 02:25.710
So we're safe.

02:25.740 --> 02:33.840
The concatenated data frame and the variable comp and let's have a look at comp so that's actually the

02:33.920 --> 02:37.700
DG dataset coming from the New York data frame.

02:37.700 --> 02:40.740
And here we have the Los Angeles data frame.

02:40.970 --> 02:44.060
And actually it looks like that the arrows match here.

02:44.300 --> 02:51.380
So we have the same prices and volume data and on the left hand side we have actually a daytime index

02:51.560 --> 02:55.190
which is localized to a UTC time.

02:55.310 --> 02:58.960
So panel is actually recognized that the T in New York.

02:59.030 --> 03:06.190
Data frame was localized in New York time and the Los Angeles data frame and Los Angeles time.

03:06.680 --> 03:12.480
And it actually aligns both that frames by simply using here the UTC time.

03:12.830 --> 03:20.610
And you can also check out our new index and we can actually see that it is the UTC time.

03:20.940 --> 03:25.170
And then we can actually add two new columns to our combined data frame.

03:25.170 --> 03:33.950
So one column with New York time and one column with Los Angeles time and we actually convert our daytime

03:33.990 --> 03:40.730
index with the UTC time to the corresponding time zones.

03:40.980 --> 03:42.520
So let's have a look here.

03:42.870 --> 03:48.400
And here we have on the right hand side two new columns New York time and Los Angeles time.

03:48.510 --> 03:56.700
And finally you might ask yourself where to get here the time zones that you have to pass here and therefore

03:56.730 --> 04:04.820
we have to impart to the pilot he said module and we can actually get all available time zones with

04:04.840 --> 04:09.620
the the attribute all time zones and we can check the length.

04:10.250 --> 04:17.850
So in total we are 592 time zones and we can also get to the most common time zones with the attribute

04:17.880 --> 04:27.390
common time zones so here we have quite a few times zones so let's scroll down here and here we can

04:27.390 --> 04:28.990
see a U.S. time zone.

04:29.010 --> 04:37.860
So U.S. Eastern U.S. Central and so on and finally we can also see a UTC that where the videos on time

04:37.850 --> 04:44.410
zones that probably are not one of the most attractive topics but the pretty important nevertheless.

04:44.410 --> 04:48.190
So thanks for watching and see us on the next video by.
