plotly / plotly/plotly.py

Explore dropping Pandas requirement for Plotly Express

Open
#4,834 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the trendline-related code shown in the linked Plotly.py pull request 4790 diff, especially lines R114-R129. Check how rolling, expanding, and ewm currently depend on Pandas and track the corresponding Narwhals support. Done means Plotly.py trendline functions no longer require Pandas after the needed Narwhals release is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data-visualization
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.