Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Pandas Profiler leads to JSON Error --> can't serialize datetime #4

Open
esherman-credo opened this issue Nov 21, 2022 · 0 comments
Open

Comments

@esherman-credo
Copy link
Contributor

Expected Behavior

DataProfiler evaluator should be serializable when calling gov.export('path/to/json/file')

Actual Behavior

Throws an error TypeError: Object of type datetime is not JSON serializable

DataProfiler uses PandasProfiler. Under the hood, PandasProfiler contains start time/end time data for when the profiling is performed. When calling get_description(), these are stored as DateTime objects which are apparently not trivially serializable by JSON.

Proposed fix: https://stackoverflow.com/questions/11875770/how-to-overcome-datetime-datetime-not-json-serializable

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant