Skip to content

Commit

Permalink
Adjust ddlgenerator wrapper for pandas 2
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Oct 20, 2024
1 parent 27dc55f commit bc67028
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ in progress
===========
- Added support for Python 3.12
- Adjusted SQL DDL for sqlalchemy-cratedb 0.40.0
- Adjusted ddlgenerator wrapper for pandas 2


2023-03-09 0.1.0
Expand Down
3 changes: 3 additions & 0 deletions skeem/ddlgen/ddlgenerator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import datetime as dt
import logging
import pprint
from collections import OrderedDict
Expand Down Expand Up @@ -80,6 +81,8 @@ def _determine_types(self):
v_candidate = th.coerce_to_specific(v_raw)
if isinstance(v_raw, str) and isinstance(v_candidate, Decimal):
v = v_raw
elif isinstance(v_raw, dt.datetime) and isinstance(v_candidate, str):
v = v_raw
else:
v = v_candidate

Expand Down

0 comments on commit bc67028

Please sign in to comment.