Skip to content

Conversation

@robin-mader-bis
Copy link
Contributor

@robin-mader-bis robin-mader-bis commented Mar 28, 2025

Disclaimer THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@robin-mader-bis robin-mader-bis changed the title BUG: multiindex pyarrow categoricals BUG: Fix pyarrow categoricals not working for pivot and categoricals Mar 28, 2025
@robin-mader-bis robin-mader-bis force-pushed the fix/multiindex-pyarrow-categoricals branch 6 times, most recently from 3b6a2fd to 864da12 Compare April 4, 2025 07:07
@robin-mader-bis robin-mader-bis marked this pull request as ready for review April 4, 2025 11:37
@robin-mader-bis robin-mader-bis changed the title BUG: Fix pyarrow categoricals not working for pivot and categoricals BUG: Fix pyarrow categoricals not working for pivot and multiindex Apr 4, 2025
@robin-mader-bis
Copy link
Contributor Author

Hey @mroeschke,
Thanks for the Review! All comments should be adressed. Could you have another look if everything looks good?

@robin-mader-bis robin-mader-bis force-pushed the fix/multiindex-pyarrow-categoricals branch 2 times, most recently from fc2bad5 to d859236 Compare April 11, 2025 06:35
@robin-mader-bis
Copy link
Contributor Author

Hey @mroeschke,
Thanks again for the review. All feedback should be addressed. Can you have another look?

@robin-mader-bis robin-mader-bis force-pushed the fix/multiindex-pyarrow-categoricals branch from a17fc48 to 096f6eb Compare April 14, 2025 11:38
@robin-mader-bis robin-mader-bis force-pushed the fix/multiindex-pyarrow-categoricals branch from 096f6eb to 5e53fec Compare April 14, 2025 15:30
@mroeschke mroeschke added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Arrow pyarrow functionality labels Apr 14, 2025
@mroeschke mroeschke added this to the 3.0 milestone Apr 14, 2025
@mroeschke mroeschke merged commit 24d31b7 into pandas-dev:main Apr 14, 2025
48 checks passed
@mroeschke
Copy link
Member

Thanks @robin-mader-bis

snitish pushed a commit to snitish/pandas that referenced this pull request Jun 9, 2025
…andas-dev#61193)

* BUG: Fix bug with DataFrame.pivot and .set_index not compatible with pyarrow dictionary categoricals

Relates to pandas-dev#53051

Code for fix taken and adapted from pandas-dev#59099

* TST: Add tests for faulty behavior relating to pyarrow categoricals

* CLN: Fix issues reported by pre-commit hooks

* TST: Fix failing tests for minimum version by ignoring obsolete deprecation warning

* DOC: Add entry for bugfix to whatsnew v3.0.0

* CLN: Refactor code and clean up according to PR feedback

* CLN: Refactor code and clean up according to PR feedback

* CLN: Refactor tests to adress PR feedback

* CLN: Refactor tests to adress PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arrow pyarrow functionality Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.pivot fails with pyarrow backend if variable is already encoded as dictionary

2 participants