Simplify conversation to python dates (pandas offers this "for free"
This commit is contained in:
parent
1d08ada939
commit
e0ad095bc7
@ -38,12 +38,7 @@ def datesarray_to_datetimearray(dates: np.ndarray) -> np.ndarray:
|
|||||||
An numpy-array of datetimes
|
An numpy-array of datetimes
|
||||||
:return: numpy-array of datetime
|
:return: numpy-array of datetime
|
||||||
"""
|
"""
|
||||||
times = []
|
return dates.dt.to_pydatetime()
|
||||||
dates = dates.astype(datetime)
|
|
||||||
for index in range(0, dates.size):
|
|
||||||
date = dates[index].to_pydatetime()
|
|
||||||
times.append(date)
|
|
||||||
return np.array(times)
|
|
||||||
|
|
||||||
|
|
||||||
def common_datearray(dfs: Dict[str, DataFrame]) -> np.ndarray:
|
def common_datearray(dfs: Dict[str, DataFrame]) -> np.ndarray:
|
||||||
|
Loading…
Reference in New Issue
Block a user