You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When type hint is not recognized (e.g. pd.Timestamp), we recursively try to convert into a dataclass which mutates the constructor throughout the codebase #51
importpandasaspdimportdataclassesimportmarshmallow_dataclass@dataclasses.dataclassclassSomething:
date_i_care_about: pd.Timestampprint(f"here's a timestamp {pd.Timestamp('2017-01-01')}")
# this mutates the constructor for pd.Timestamp by recursively trying to convert to dataclassmarshmallow_dataclass.class_schema(Something)
print(f"here's a timestamp {pd.Timestamp('2017-01-01')}")