Skip to content

Commit 2a01173

Browse files
kfollesdalkravets-levko
authored andcommitted
Fix pandas 2.2.2 support (#416)
* Support pandas 2.2.2 See release note numpy 2.2.2: https://pandas.pydata.org/docs/dev/whatsnew/v2.2.0.html#to-numpy-for-numpy-nullable-and-arrow-types-converts-to-suitable-numpy-dtype * Allow pandas 2.2.2 in pyproject.toml * Update poetry.lock, poetry lock --no-update * Code style Signed-off-by: Levko Kravets <levko.ne@gmail.com> --------- Signed-off-by: Levko Kravets <levko.ne@gmail.com> Co-authored-by: Levko Kravets <levko.ne@gmail.com> Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 04b626a commit 2a01173

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include = ["CHANGELOG.md"]
1212
python = "^3.8.0"
1313
thrift = ">=0.16.0,<0.21.0"
1414
pandas = [
15-
{ version = ">=1.2.5,<2.2.0", python = ">=3.8" }
15+
{ version = ">=1.2.5,<2.3.0", python = ">=3.8" }
1616
]
1717
pyarrow = ">=14.0.1,<17"
1818

src/databricks/sql/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def _convert_arrow_table(self, table):
11641164
timestamp_as_object=True,
11651165
)
11661166

1167-
res = df.to_numpy(na_value=None)
1167+
res = df.to_numpy(na_value=None, dtype="object")
11681168
return [ResultRow(*v) for v in res]
11691169

11701170
@property

0 commit comments

Comments
 (0)