Skip to content

Commit

Permalink
Merge pull request #8 from dataiku/feature/dss13-sc-206893-use-pandas…
Browse files Browse the repository at this point in the history
…-1-3-instead-of-1-5
  • Loading branch information
fabienDaou authored Oct 7, 2024
2 parents 64727b2 + 53b2cd2 commit cf387d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dss-plugin-visual-edit/code-env/python/desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"PYTHON38",
"PYTHON39"
],
"corePackagesSet": "PANDAS15",
"corePackagesSet": "PANDAS13",
"installCorePackages": true,
"installJupyterSupport": false,
"basePackagesInstallMethod": "PRE_BUILT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dash>=2.4.0
dash_extensions
pydantic
pandas==1.5.3
pandas==1.3.5
3 changes: 2 additions & 1 deletion dss-plugin-visual-edit/python-lib/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def apply_edits_from_df(original_ds, edits_df):
if col in primary_keys + display_columns + editable_columns:
if is_integer_dtype(original_dtype):
# there may be missing values so choose a dtype supporting them.
edits_df[col] = edits_df[col].astype(Int64Dtype())
# Cast as float first to work around issue with pandas 1.3 https://stackoverflow.com/a/60024263
edits_df[col] = edits_df[col].astype(float).astype(Int64Dtype())
elif is_float_dtype(original_dtype):
edits_df[col] = edits_df[col].astype(float)
else:
Expand Down

0 comments on commit cf387d1

Please sign in to comment.