zip calls should ideally specify strict=True since most of the time there's an underlying assumption that the input arguments are of equal length. To enforce this we should enable the Ruff rule zip-without-explicit-strict, https://docs.astral.sh/ruff/rules/zip-without-explicit-strict/

Since there are about ~500 occurrences of zip in the code base, this issue should be completed in multiple PRs that adds strict=True to zip calls in a particular directory. Therefore, this issue can be worked on by multiple contributors.

For those interested in working on this issue:

  1. Comment below on which directory you'll be working on. If you want to work on pandas/core, please choose a subdirectory in this location e.g. pandas/core/internals
  2. Submit a PR adding strict=True (or strict=False if necessary) to zip calls

Once all zip calls are have a strict argument, a separate PR will be needed to move "B905" from the ignore section to the select section. https://github.com/pandas-dev/pandas/blob/98c9c7f838d223e66f1459fab23ac178b29c2227/pyproject.toml#L395

Comment From: LirongMa

Hello Matthew, I can work on pandas/io directory. Please assign this issue to me. Thank you.

Comment From: anthonyspeicher

Hey Matthew, I'll work on pandas/core/internals. Thanks!

Comment From: Alvaro-Kothe

Hi @mroeschke, I created a PR (#62446) that can help the verification of these fixes in CI.

Comment From: shivamvishal

Hi Matthew, I can work on "pandas/plotting/". Thanks!

Comment From: Sayeem3051

Hi Matthew, I can work on pandas/compat directory. Thanks!

Comment From: LirongMa

My PR for pandas/io is ready - Enforce Ruff rule B905 for pandas/io #62469

Comment From: shivamvishal

Hi @mroeschke, Please review My PR for pandas/plotting : https://github.com/pandas-dev/pandas/pull/62478 I have kept the zip strict policy just flexible enough that all the tests passes.

Not sure why docstring validations are failing. But rest of the tests are passing.

Comment From: jsngn

I can work on pandas/core/reshape

Comment From: CODEBRAKERBOYY

Hi I’ll work on pandas/core/arrays. I’ll add explicit strict= to all zip() calls there per Ruff rule B905 and open a PR shortly.

Comment From: floura-angel

Hi! I'll work on pandas/core/groupby and pandas/core/computation. Thanks

Comment From: shivamvishal

Hi, I'll work on pandas/util and pandas/_libs

Comment From: asoledad33

Hi. I'd like to work on pandas/core/dtypes and pandas/core/strings. Thanks

Comment From: RAAPPO

Hi! I would like to work on pandas/core/window for this issue. Please assign it to me. I am a first-time contributor. Thank you!

Comment From: krishna-datta

Hi! I'd like to work on pandas/core/indexes! Please assign it to me, thanks

Comment From: shivamvishal

Hi, I'll work on files directly under pandas/core directory.

Comment From: RAAPPO

Hi,

I would like to work on the following directories for the Ruff B905 issue:

  • pandas/core/frame
  • pandas/tests

Please assign these to me. Thank you!

Comment From: natianyudi

Hi,

I would like to work on pandas/conftest.py. Thanks!

Comment From: GKK-Hub

Working on pandas/core/array_algos/quantile.py in #62575

Comment From: shivamvishal

Hi @mroeschke , please review: https://github.com/pandas-dev/pandas/pull/62577

Comment From: GuruprashanthKrishnakumar

Hey @mroeschke ,

I will work on pandas/core/arrays. Please assign those to me.

Thanks!