SDOML / SDOMLv2

MIT License
8 stars 1 forks source link

AIA datetime format #6

Open ManuelIndac0 opened 1 year ago

ManuelIndac0 commented 1 year ago

The datetime format for December 31st, 2020 is timezone-naive, while all other dates are timezone-aware (see picture). As such, when creating a datetime object, an error occurs. The following example may be a way to fix the issue, as it ensures a desired time format for all dates.

transform_datetime = lambda x: pd.to_datetime(x, format='mixed').strftime('%Y-%m-%d %H:%M:%S') df_t_aia['Time'] = df_t_aia['Time'].apply(transform_datetime)

image