2
1

pandas3.0からpyarrowが依存関係に必須になるようです

Posted at

はじめに

Pandas2.2でアプリを実行した時に警告が発生しました。

xxx.py:1: DeprecationWarning: 
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
        
  import pandas as pd

Pyarrowはpandasの次のメジャーリリース(pandas 3.0)でpandasの必須の依存関係になります、
(Arrow文字列型のような、より性能の高いデータ型や、他のライブラリとの相互運用性を向上させるため)
が、あなたのシステムにはインストールされていませんでした。
これにより問題が発生する場合は
https://github.com/pandas-dev/pandas/issues/54466 までご連絡ください。

import pandas as pd
(DeepLで翻訳)

要するにPandas3.0でPyArrowが必須依存関係になるようです。

詳しくは以下のGitHubのissueページへ

環境

$ pip list
Package         Version
--------------- -------
pandas          2.2.0

$ python -V
Python 3.12.1

エラーではないけど

Warningなのでエラーではないので慌てることはないです。
Pandasのver3.0からpyarrowというライブラリのインストールが必要になります。

将来的なPandasのバージョンアップに備えてpyarrowをインストールします。

pip install pyarrow

PyArrowとは

PyArrowはApache ArrowのPython実装で、データの効率的な転送とアクセスを実現します。これにより、大規模なデータセットの処理が高速化され、メモリ使用量が最適化されます。Pandasとの統合により、より高性能なデータ型の利用や、他のデータ処理ライブラリとの相互運用性が向上します。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1