Reputation: 211
I saw the code from Youtube and have a question.
The code below imports time
twice.
import pandas as pd
import os
import time
from datetime import datetime
from time import mktime
By importing time on third line, I think 5th line is useless.
Why does he import time twice?
Upvotes: 5
Views: 127
Reputation: 798686
Why does he import time twice?
He doesn't. He copies time.mktime
to mktime
. He doesn't have to, he just does so for convenience.
Upvotes: 7