• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

polars

date: 2023-03-16 excerpt: polarsの使い方

tag: pythonpandaspolarsrust


polarsの使い方

概要

  • 2023年に有名になった
  • rustで書かれたpandasのようなもの
  • polarsは白熊のこと
    • ポーラーズという発音
  • 多くの面でpandasより高速と言われている
  • jupyter notebookでpandasのように表示できる
  • 遅延評価のようなインターフェースがある

インストール

$ python3 -m pip install polars

具体例

csvファイルの読み込

import polars as pl
path = r'https://raw.githubusercontent.com/chendaniely/pandas_for_everyone/master/data/gapminder.tsv'
df = pl.read_csv(path, sep='\t')

display(df.head()) # 表示
display(df.describe())


pythonpandaspolarsrust Share Tweet