Computers are good at recording timestamps, but they do it in Unix time. Sadly, humans aren’t great at interpreting Unix time.
Below is a dataframe of YouTube comments where users posted what they considered to be the best opening line in literature.
shape: (4, 3)
Commment
User
Unix_Time
str
str
f64
"In my younger and more vulnera…
"@fscott"
1698592675.131816
"Call me Ishmael."
"@hmelville"
1680453910.612181
"It was the best of times, it w…
"@cdickens"
1701274456.134241
"It is a truth universally ackn…
"@jausten"
1701274277.673785
From Unix time to normal datetime
Unless you’re familiar with interpreting Unix timestamps, it’s difficult to tell when each comment was posted. Fortunately, Polars makes it easy to convert these timestamps into a human-readable format. Here’s how to do it.