plotly / plotly/plotly.py

Explore dropping Pandas requirement for Plotly Express

未关闭
#4,834 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature P2
主要语言
Python
星标
18.8k
派生
2.8k
平均合并
16 小时 26 分钟
30 天内合并 PR
21

描述

In https://github.com/plotly/plotly.py/pull/4790, nearly all Pandas functionality is removed from Plotly.py, except some of our trendine functions.

Narwhals does not yet support rolling, expanding nor ewm, and until that support is added, we need to use Pandas to calculate trendlines.

Those functions are on the Narwhals roadmap, and we should have a quick follow-up in Plotly.py to implement those changes after the first set of Narwhals changes are made and the good folks at Narwhals release that update 🙂 .

See: https://github.com/plotly/plotly.py/pull/4790/files/6676061152527160b44dbf67ecf6b89e46eef3b2#diff-e667a84629ee8d2879cf22a88c8ff80bcfec1c35be69ab9f50be5938c7089ddaR114-R129

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Plotly.py pull request 4790 diff 中展示的 trendline 相关代码开始,尤其是第 R114-R129 行。检查 rolling、expanding 和 ewm 当前如何依赖 Pandas,并跟踪 Narwhals 的对应支持。所需的 Narwhals release 可用后,如果 Plotly.py 的 trendline 函数不再需要 Pandas,则视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
pandas, python
领域
data-visualization
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。