Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Processing Dates | Preprocessing Data: Part II
Analyzing and Visualizing Real-World Data

Processing Dates

We are close to finishing! Let's see what data types our data has now.

As you can see, there is only one object column left. You may be wondering why this is bad. Actually, we can leave it as is, but pandas provides us with tools to work with dates and times. Unfortunately, datetime is not a built-in data type in Python, so we can't convert the column and save it. We will have to convert it after loading every time. To convert to datetime type, we need to use the .to_datetime() method of pd.

As you can see, visually the dates have changed, i.e., they are now represented in a different format.

What is the initial format of dates in the 'Date' column? (dd - day, mm - month, yyyy - year)

Select the correct answer

Everything was clear?

Section 2. Chapter 3
course content

Course Content

Analyzing and Visualizing Real-World Data

Processing Dates

We are close to finishing! Let's see what data types our data has now.

As you can see, there is only one object column left. You may be wondering why this is bad. Actually, we can leave it as is, but pandas provides us with tools to work with dates and times. Unfortunately, datetime is not a built-in data type in Python, so we can't convert the column and save it. We will have to convert it after loading every time. To convert to datetime type, we need to use the .to_datetime() method of pd.

As you can see, visually the dates have changed, i.e., they are now represented in a different format.

What is the initial format of dates in the 'Date' column? (dd - day, mm - month, yyyy - year)

Select the correct answer

Everything was clear?

Section 2. Chapter 3
some-alt