Puzzle 8: Once Upon a Time

Let's exercise our minds by solving this timestamp puzzle.

We'll cover the following

Guess the output

Try to guess the output of the code below:

Press + to interact
import pandas as pd
s1 = pd.to_datetime([
'2020-01-01T00:00:00+00:00',
'2020-02-02T00:00:00+00:00',
'2020-03-03T00:00:00+00:00',
])
s2 = pd.Series([
pd.Timestamp(2020, 1, 1),
pd.Timestamp(2020, 2, 2),
pd.Timestamp(2020, 3, 3),
])
print(s1 == s2)

Quiz

Q

What is the output of the code above?

A)

True

B)

False

C)

TypeError

D)

SyntaxError

Get hands-on with 1300+ tech skills courses.