Skip to content

Fix: do not convert missing seed string column values to string#2086

Merged
treysp merged 2 commits intomainfrom
trey/mssql-seed-nan
Feb 5, 2024
Merged

Fix: do not convert missing seed string column values to string#2086
treysp merged 2 commits intomainfrom
trey/mssql-seed-nan

Conversation

@treysp
Copy link
Contributor

@treysp treysp commented Feb 5, 2024

If a seed file contained a missing value in a string column, its NaN value was coerced to string "nan" with pandas astype(str). This PR ensures only non-missing values are coerced to string.

Also:

  • Converts NaN values to None for MSSQL engine pymssql library
  • Adds integration test confirming successful NaN -> db NULL -> NaN/None roundtrip

@treysp treysp requested review from eakmanrq and izeigerman February 5, 2024 23:01
@treysp treysp changed the title Fix: do not convert missing seed values to string Fix: do not convert missing seed string column values to string Feb 5, 2024
@treysp treysp merged commit 4c19766 into main Feb 5, 2024
@treysp treysp deleted the trey/mssql-seed-nan branch February 5, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants