Convert String Column directly to Date format (not Datetime) in Pandas DataFrame
use df['a'] = pd.to_datetime(df['a'], format='%Y-%m-%d')
specify the format if you know they are all following the same format.
I have a following Pandas DataFrame:

df = pd.DataFrame({'a': ['2020-01-02', '2020-01-02']})

Obviously, the column 'a' is string. I want to convert it to 'Date' type; and here is what I did:

df['a'] = df['a'].apply(pd.to_datetime).dt.date

It works, but in reality my DataFrame has 500,000 + rows. It seems to be very inefficient. Is there any way to directly and more efficiently convert string column to Date column?