Consider making pandas an optional dependency
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 50/100
調査の方向性
src/databricks/sql/client.py を開き、pandas の import と _convert_arrow_table メソッド、特に disable_pandas 条件を調べてください。import を移動し、その変換パスが実行される場合にのみ pandas が必要になるようにしてから、テストスイートを実行し、pandas をアンインストールした後でも、示されている Connection と polars の例が動作することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Description
Currently pandas is a hard requirement for the library, however not necessarily used.
By delaying pandas import in src/databricks/sql/client.py from the top of the file to _convert_arrow_table method after the if self.connection.disable_pandas is True: condition it would be possible to make pandas an optional dependency.
I was able to run all the tests with this change flawlessly, as well as uninstalling pandas and then run the following:
import polars as pl
from databricks.sql.client import Connection
credentials = ...
query = ...
conn = Connection(
server_hostname=credentials["server_hostname"],
http_path=credentials["http_path"],
access_token=credentials["access_token"],
)
dframe = pl.read_database(query, conn)
without any issue
- 主要言語
- Python
- スター
- 233
- フォーク
- 152
- 平均マージ
- 21時間 5分
- マージ済み PR(30日)
- 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
databricks/databricks-sql-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
databricks/databricks-sql-python の issue をすべて見る
似ている issue
-
fix: inaccuracy ⚠️
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
uabrc/uabrc.github.io#1255 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ethereum-optimism/factory#64 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
duckdb/duckdb-python#627 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
Qiskit/qiskit-addon-sqd#376 ·