Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Welcome to the lecture on engineering.
Date and time variables.
Early on in the course we learned that date and time variables are those.
But it was that contained date time or a combination of both is something that we call a timestamp or
a date.
Timestamp we also saw some examples of date and date and time variables like for example date of birth
which in this case contains only dates.
Date of application for example for a loan which in this case contains the year and the month time of
accident.
For example which in this case contains only time for example as well payment date which contains in
this example a combination of date and time so all of these are examples of date and time variables
and in general we don't use them as such.
When we build machine learning mothers but we rather extract a variety of features from these characteristics
let's have a look on how we can do that.
So here we can see the anatomy of a daytime viable in this variable payment date that contains a date
and time we can see how we can easily derive the year of payment from this part of the variable.
We can also derive the months of the payment and with this variable we can create features that take
numbers from one to twelve indicating the month but we can also derive the quarter of the year in which
the payment was made or even the semester if we were interested similarly we can get they information
from the day part of the day time variable and we can get this information in the form of Monday Tuesday
Wednesday or instead numbers or we can create variables like is we can for example by looking at whether
these dates are Saturday or Sunday as we will see in the Jupiter notebook later on in the section we
can also look at the time part of the variable and derive our minutes and seconds.
Looking at the different components of the time and we can also get creative and look at whether this
payment took place in the morning or in the afternoon or in the evening more interesting.
We can calculate the time that passed between two variables.
For example we have the variable first payment date which contains a date on a time and then we have
another different variable that contains the information about the last payment date.
The similar format we can calculate the difference in time and we can express this in the number of
days that passed between the two payments or the number of months or the number of years or if the difference
is not as big as the one that I show in this example.
We can also calculate the difference in hours minutes and seconds.
Finally we need also to pay attention to the different time zones in which we can have two variables
particularly if our organization operates worldwide.
The Thompson empanadas is going to be indicated by a plus or a minus on the different of ours respect
to the center which is 0 so in order to operate with these variables we first need to put them in the
same star timestamp.
Whichever you want in this case I chose 0.
So as you can see 15 is two hours plus respect to zero.
So in the zero time zone this would be 1:00 o'clock whereas this one it's 3 p.m. but this time zone
is five times ahead of the center.
So in the center time it would be 10 a.m. and now that we have the values in the same time zone we can
operate and extract differences in time as we did in the previous light
in the rest of the section.
I'm going to cover two Jupiter notebooks in the first one I'm going to show you how to engineer dates
using banned and in the second one I'm going to show you how to engineer times using binders as well.
Feel free to read the notebooks in your own time or if you prefer.
Come with me in the next two videos and I will walk you through the notebooks.
See you in a bit.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.