pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
26.63k stars 1.63k forks source link

fix(python): raise error when pandas df's some index name duplicates some column name #16023

Closed piri-p closed 2 weeks ago

piri-p commented 2 weeks ago

Fix #15938 : raise ValueError when converting from pandas DF, whose index name duplicates some column name @MarcoGorelli

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.92%. Comparing base (864e750) to head (2a5dccf).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16023 +/- ## ======================================= Coverage 80.91% 80.92% ======================================= Files 1385 1385 Lines 178224 178227 +3 Branches 3050 3051 +1 ======================================= + Hits 144212 144227 +15 + Misses 33522 33512 -10 + Partials 490 488 -2 ``` | [Flag](https://app.codecov.io/gh/pola-rs/polars/pull/16023/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pola-rs) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/pola-rs/polars/pull/16023/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pola-rs) | `74.42% <100.00%> (+0.02%)` | :arrow_up: | | [rust](https://app.codecov.io/gh/pola-rs/polars/pull/16023/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pola-rs) | `78.13% <0.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pola-rs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

piri-p commented 2 weeks ago

Thanks for your feedback @mcrumiller ! I have addressed your concerns (update code to handle MultiIndex, moved tests to test_interop.py, and add tests for MultiIndex)