-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
BUG: Raise clear error when assign is used with non-string column keys #61297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e_convert_objects) (#54512) Backport PR #54498: Speed up string inference in maybe_convert_objects Co-authored-by: Patrick Hoefler <[email protected]>
…ng.corr) (#54513) Backport PR #54504: Move Unit Tests for groupby.rolling.corr Co-authored-by: omar-elbaz <[email protected]>
…A dtypes) (#54514) Backport PR #54509: PERF: Dataframe reductions with EA dtypes Co-authored-by: Luke Manley <[email protected]>
Backport PR #54517: Run CI on 2.1.x Co-authored-by: Patrick Hoefler <[email protected]>
…) workarounds for pyarrow versions >= 11.0) (#54524) Backport PR #54515: ENH: ArrowExtensionArray(duration) workarounds for pyarrow versions >= 11.0 Co-authored-by: Luke Manley <[email protected]> Co-authored-by: Patrick Hoefler <[email protected]>
…types) (#54528) Backport PR #54341: PERF: axis=1 reductions with EA dtypes Co-authored-by: Luke Manley <[email protected]>
… variable) (#54538) Backport PR #54536: REF: Move checks to object into a variable Co-authored-by: Patrick Hoefler <[email protected]>
…red with new string dtype) (#54539) Backport PR #54534: REF: Move methods that can be shared with new string dtype Co-authored-by: Patrick Hoefler <[email protected]>
… for string tests) (#54559) Backport PR #54537: REF: Refactor using_pyarrow check for string tests Co-authored-by: Patrick Hoefler <[email protected]>
Backport PR #54525: BLD: Fix version script Co-authored-by: Thomas Li <[email protected]>
…s list) (#54562) Backport PR #54493: DOC: updated required dependencies list Co-authored-by: Rajat Subhra Mukherjee <[email protected]>
… namespace refactor Part 3) (#54583) Backport PR #54579: ENH: Reflect changes from `numpy` namespace refactor Part 3 Co-authored-by: Mateusz Sokół <[email protected]>
…54588) Backport PR #54545: DOC: whatsnew 2.1.0 refinements Co-authored-by: Richard Shadrach <[email protected]>
…rage checks with variable) (#54594) Backport PR #54535: REF: Replace "pyarrow" string storage checks with variable Co-authored-by: Patrick Hoefler <[email protected]>
…pport for arrow dtypes) (#54603) Backport PR #54574: ENH: add cummax/cummin/cumprod support for arrow dtypes Co-authored-by: Luke Manley <[email protected]>
… the README) (#54619) Backport PR #54615: DOC: Update build instructions in the README Co-authored-by: Thomas Li <[email protected]>
#54614) Backport PR #54587: CI: Enable MacOS Python Dev tests Co-authored-by: Matthew Roeschke <[email protected]>
…lue) (#54658) Backport PR #54586: REF: Refactor conversion of na value Co-authored-by: Patrick Hoefler <[email protected]>
…tli as optional dependencies (no longer used)) (#54637) Backport PR #54633: DEP: remove python-snappy and brotli as optional dependencies (no longer used) Co-authored-by: Joris Van den Bossche <[email protected]>
…#54669) Backport PR #54641: BUG: getitem indexing wrong axis Co-authored-by: Patrick Hoefler <[email protected]>
…y strings with arrow string option) (#54672) Backport PR #54496: Fix inference for fixed with numpy strings with arrow string option Co-authored-by: Patrick Hoefler <[email protected]>
…w duration conversion) (#54688) Backport PR #54678: COMPAT: Workaround invalid PyArrow duration conversion Co-authored-by: Matthew Roeschke <[email protected]>
…entation for merge) (#54689) Backport PR #54510: Speed up StringDtype arrow implementation for merge Co-authored-by: Patrick Hoefler <[email protected]>
…in ArrowExtensionArray) (#54691) Backport PR #54685: ENH: support integer bitwise ops in ArrowExtensionArray Co-authored-by: Luke Manley <[email protected]>
…boolean arrow dtype with missing values) (#54692) Backport PR #54670: BUG: drop_duplicates raising for boolean arrow dtype with missing values Co-authored-by: Patrick Hoefler <[email protected]>
…loat, timedelta64 dtypes) (#54693) Backport PR #54566: ENH: support Index.any/all with float, timedelta64 dtypes Co-authored-by: jbrockmendel <[email protected]>
…calls) (#54697) Backport PR #54694: MAINT: Remove `np.in1d` function calls Co-authored-by: Mateusz Sokół <[email protected]>
…ne series) (#54698) Backport PR #54625: BUG: Fix error in printing timezone series Co-authored-by: Adrian D'Alessandro <[email protected]>
…dtypes) (#54700) Backport PR #54508: PERF: DataFrame.iloc[int] for EA dtypes Co-authored-by: Luke Manley <[email protected]>
…ing numba raising TypeError when the…) (#55686) Backport PR #55586: REGR: Groupby methods not supporting numba raising TypeError when the… Co-authored-by: Thomas Li <[email protected]>
… values when ts index is not nano seconds) (#55697) Backport PR #55173: BUG: .rolling() returns incorrect values when ts index is not nano seconds Co-authored-by: Hadi Abdi Khojasteh <[email protected]>
#55701) Backport PR #55527: BUG fix deprecation of `limit` and `fill_method` in `pct_change` Co-authored-by: Yao Xiao <[email protected]>
…n of large strings (avoid overflow from concat)) (#55706) Backport PR #55691: REGR: fix read_parquet with column of large strings (avoid overflow from concat) Co-authored-by: Joris Van den Bossche <[email protected]>
) Backport PR #55722: DOC: Add whatsnew for 2.1.3 Co-authored-by: Joris Van den Bossche <[email protected]>
… inference for NEP 50) (#55716) Backport PR #55707: REF: Avoid np.can_cast for scalar inference for NEP 50 Co-authored-by: Matthew Roeschke <[email protected]>
…55749) Backport PR #55747: DOC: Fix release date for 2.1.2 Co-authored-by: Thomas Li <[email protected]>
…utc) (#55796) Backport PR #55726: fix segfault with tz_localize_to_utc Co-authored-by: William Ayd <[email protected]>
…lt for Numpy 2.0) (#55851) Backport PR #55817: COMPAT: Numpy int64 Windows default for Numpy 2.0 Co-authored-by: Matthew Roeschke <[email protected]>
…emove pytest-asyncio (#55858)
* TST: Make read_csv tests pyarrow 13 compatable on 2.1.x * Skip on windows for ARROW_TIMEZONE_DATABASE
…er has the wrong dtype / from_dataframe incorrect ) (#55863) Backport PR #55227: BUG: Interchange object data buffer has the wrong dtype / from_dataframe incorrect Co-authored-by: Marco Edward Gorelli <[email protected]> Co-authored-by: MarcoGorelli <[email protected]>
…umPy's broadcasting) (#55896) Backport PR #55427: DOC: Remove outdated docs about NumPy's broadcasting Co-authored-by: cobalt <[email protected]>
…uctor_from_mgr for simple subclasses) (#55892) Backport PR #55764: REGR: fix return class in _constructor_from_mgr for simple subclasses Co-authored-by: Isaac Virshup <[email protected]>
…ype autoload (#55900) Parquet/Feather IO: disable PyExtensionType autoload (#55894) * Parquet/Feather IO: disable PyExtensionType autoload * don't install hotfix for pyarrow >= 14.0.1 * move patching to extension type definitions * expand error message * fix compat for pyarrow not installed * add whatsnew (cherry picked from commit 851fea0)
…55913) Backport PR #55907: DOC: Add release date for 2.1.3 Co-authored-by: Thomas Li <[email protected]>
…NumPy's broadcasting to literal code block) (#55912) Backport PR #55911: DOC: convert outdated example of NumPy's broadcasting to literal code block Co-authored-by: Joris Van den Bossche <[email protected]>
Thanks for the PR, but it appears there a lot of changes in unrelated files. Going to close this PR, but ensure that pull requests are made from the latest commit on main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes confusing behavior when
.assign()
is used with non-string keys like tuples. Python raises a genericTypeError: keywords must be strings
, which confuses users.This PR adds a more helpful message:
Why?
This improves the developer experience and avoids unnecessary debugging time.
How was this fixed?
__kwargs_dict__
as a keyword-only argument for testing with tuple keysassign()
for string-only keystest_assign_with_tuple_column_key_raises_typeerror
Test added
test_assign_with_tuple_column_key_raises_typeerror