Open
Description
Code to reproduce:
import numpy as np
import pandas as pd
np_datetimes = np.array([datetime.date(2010, 1, 1)], dtype="datetime64[D]")
other = pd.array(["a", "b"], dtype="category")
pd.core.dtypes.concat.concat_categorical([np_datetimes, other])
# outputs:
# array([Timestamp('1970-01-01 00:00:00.000014610'), 'a', 'b'], dtype=object)
# expected either one of
# a) array([Timestamp('2010-01-01 00:00:00'), 'a', 'b'], dtype=object)
# b) array([datetime.date(2010, 1, 1), 'a', 'b'], dtype=object)
This happens as concat_datetime
/ _convert_datetimelike_to_object
assumes that datetimes are nanoseconds only.