forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 1
Fix: Improve error handling in dropna for mixed data types #11
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
Open
hebawl
wants to merge
153
commits into
Pandas-Boosters:heba
Choose a base branch
from
hebawl:heba
base: heba
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
* REGR: Interpolate with method=index * Magic trailing comma * perf * Update docstring
…ons (pandas-dev#61198) BUG: Fix AttributeError in pd.eval for method calls on binary operations (pandas-dev#61175)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.23.1 to 2.23.2. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.23.1...v2.23.2) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…names (pandas-dev#61207) * Fix pandas-dev#60494: query doesn't work on DataFrame integer column names * fix: removed line that ignores an integer column name from _get_cleaned_column_resolvers Also removed the changes from the previous commit, which converted integer column names to strings
* MNT: Bump dev pin on NumPy * Fix type-hints * Docs fixup * fixups * Fixup * Fixup * doctest fixups * More doc fixes * Some reverts * Avoid float16 * Cleanup * Remove repr from MyExtensionArray * Fixup
…9636) * Fix binary operators on attrs for Series and DataFrame * Add tests for Series and DataFrame for attrs binary operations * Add getattr as other might not possess attrs as attribute * Fix some tests in pandas/tests/generic/test_finalize.py::test_binops * remove xfail tests related to attrs * Add all_binary_operators * use __finalize__ for attrs bin ops in base.py * use __finalize__ for attrs bin ops in frame.py * use __finalize__ for attrs bin ops in series.py * ENH: Ensure attrs are copied from other in Series arithmetic operations. Moved from base.py to series.py * REF: Refactor binary operation tests for DataFrame and Series attributes * REF: Enhance _construct_result method to accept 'other' parameter for improved attribute handling * REF: Simplify test_attrs_binary_operations by parameterizing left and right inputs * Refactor DataFrame and Series methods to improve attribute handling and finalize behavior * Refactor DataFrame alignment logic to improve attribute consistency * Refactor DataFrame and Series methods to enhance attribute finalization logic * Clean and remove unnecessry checks * Fix: Prioritizing False if self.flags.allows_duplicate_labels or other.flags.allows_duplicate_labels is False
…ev#61228) Fix false friends in implicit string concatenation
…1214) * clip correlation coefficient between -1 and 1 * Added test to check if corr within bounds * Added tuple to mistyped parameter * Transfered np.clip to algos.nancorr * Clip covxy / divsor instead of result * Clip covxy / divsor within nogil * Added whatsnew note * Replaced long entry with single entry * restricted clipping to when cov=False * Added test for covariance * Changed name of test variables * fixed test case for cov --------- Co-authored-by: John Hendricks <[email protected]>
…ow dtype (pandas-dev#61229) * BUG: Fix pandas-dev#61222: Keep index name when resampling with pyarrow dtype * Update doc/source/whatsnew/v3.0.0.rst --------- Co-authored-by: Matthew Roeschke <[email protected]>
Added docstrings to min, max, and reso Co-authored-by: John Hendricks <[email protected]>
* Bump pre-commit version, bump clang-format and meson * Fix type checking abbreviation * Bump to 0.11.4 * Put minimum version at 4 * Change misc to arg-type
…-dev#61162) * updated indexing.py to allow iloc.__getitem__ * Updated test_iloc_mask test * bugfix test_iloc_mask test * bugfix test_iloc_mask * whatsnew * added test to test_iloc_mask * formatting * precommit * added tests for series bool mask * precommit * reformatted tests
…#61244) * Refactor time series plotting logic for improved clarity Extract and streamline time series preparation steps into `prepare_ts_data`, replacing redundant logic across methods. Simplifies axis frequency handling and improves code readability while maintaining functionality. * Add test to validate xtick alignment for scatter and line plots This test ensures that the x-axis ticks are consistent between scatter and line plots when sharing the same axis. It addresses a potential issue related to GH#61005, verifying proper rendering of datetime x-axis labels. * Fix bug in Series.plot misalignment for line and scatter plots This resolves an issue where line and scatter plots were not aligned when using Series.plot. The fix ensures proper alignment and improves plot consistency. Refer to issue pandas-dev#61005 for further details. * Update scatter plot test to support datetime.time data Datetime.time is now supported in scatter plots due to added converter implementation in ScatterPlot. Removed the test expecting a TypeError and updated it to validate the new functionality. * Refactor handling of x_data in matplotlib plotting. Simplify and streamline the code by directly assigning x_data from the data variable and replacing the intermediate Series object with a clearer `s` variable. This improves readability and maintains the existing functionality. * Move test_scatter_line_xticks from Series to DataFrame tests Relocated the `test_scatter_line_xticks` test from `test_series.py` to `test_frame.py` for better alignment with DataFrame-specific functionality. This refactor ensures the test resides in the appropriate context based on its usage and focus. * Refactor `prepare_ts_data` to improve type annotations. Added precise type annotations to the function signature for better clarity and type checking. Replaced `data` with `series` and `kwds` with `kwargs` to enhance readability and consistency. * Refactor test_scatter_line_xticks to simplify DataFrame creation The DataFrame creation in the test has been streamlined for clarity and conciseness by replacing the loop with a list comprehension. This improves code readability and maintains the same functionality. * Refactor Series import to optimize scope and maintain consistency Moved the `Series` import inside relevant function scopes to minimize unnecessary top-level imports and align with existing import patterns. This helps improve code readability and ensures imports are only loaded where needed. * `Reorder import statement in _make_plot method` Moved the import of `Series` within the `_make_plot` method to comply with styling or runtime considerations. This ensures consistency and avoids potential import-related issues.
DOC: Update ArcticDB link in ecosystem.md
…ndas-dev#61249) * BLD: Try pinning ninja<1.11.1.4 for windows free threading build * quote * change to triple and double quotes * Add in script instead * Add in script instead * Try numpy 2.2.3 * Double quotes * Try 2.2.2 * Install older Cython * Try commit from March 17 * try march 19 commit 0b866bf7d43ced968dba4e9726316f963aae8f3c * Try march 18 commit b4917f731da50062f8ba53737ade7b82b4c8fcf2 * One commit after c compiler warnings PR * Use March 20 commit 93a7d09d47d8aae0dfcea41d06f4b140a1161499 * Use cb156c48d94b7e13363ab791b16bdeeb3392f21e before vector call * One more divmod commit * USe divmod commit * Use commit before divmod, undo ninja and numpy changes
* Changed term non-null to NA * Update pandas/io/formats/info.py Co-authored-by: Matthew Roeschke <[email protected]> --------- Co-authored-by: Matthew Roeschke <[email protected]>
CI Maybe fix Windows free-threaded Co-authored-by: Matthew Roeschke <[email protected]>
* TYP: Add ignores for numpy 2.2 updates * fix tests and plotting * ignore pyright error
…rectly for full error details (pandas-dev#61084) * Add hint to display full message for missing dependencies in pandas/init.py * ENH: Improve import error handling to preserve original traceback * TST: refactor testing for hard dependency package * Update pandas/__init__.py Co-authored-by: Matthew Roeschke <[email protected]> * Refactor prevent statement too long * ENH: change unittest to verify ImportError is raised when required dependencies are missing * TST: Use pytest.raises match parameter in test_missing_required_dependency --------- Co-authored-by: Matthew Roeschke <[email protected]>
* PERF: stack on non-MultiIndex columns * WIP * Use reshape instead of ravel * arrays -> blocks * Update test * whatsnew
…as-dev#61208) (pandas-dev#61216) * Fix pandas-dev#61208: OverflowError when fillna on DataFrame with a pd.Timestamp - Now correctly raises OutOfBoundsDatetime - Added test_fillna_out_of_bounds_datetime() * Comply with pre-commit and added an entry in v3.0.0.rst * Removed flag 'inplace=True' from test and fixed the bug for this case.
* update whatsnew * improve message
title capitalization and update
* added exclude_dates argument and test for holiday class * added entry on whatsnew * moved pull request to v3.0.0 whatsnew * updated exclude_dates to be [Timestamp] in constructor * updated Holiday.dates() to use difference method * condensed type_checking import statement to 1 line * switchted exclude_dates type from list[Timestamp] to DatetimeIndex * raise ValueError if exclude_dates is not DatetimeIndex * isinstance to check exclude_data * updated tests for DatetimeIndex type change * added proper result-expected assertion pattern for tests * removed redundant asserts
…1604) REF: Replace os.path with pathlib.Path in pandas_web.py Co-authored-by: Marc Garcia <[email protected]>
…ndas-dev#61577) Co-authored-by: Marc Garcia <[email protected]>
* fix std/var with complex array * added whatsnew entry
* Support for Orthodox Easter * Fix lint issues * Fix test * Fix lint * Fix lint issues * Fix lint * Fix lint * Fix lint * Fix lint * Fix * Updated whats new doc * Add validation * Fix review feedback * Fix lint
* WEB: Reorganization of the Ecosystem page * Changing subtitle level of packages * Add back part of the intro
…andas-dev#61615) BUG: Fix RecursionError when apply native container types as a func (pandas-dev#61565)
* changed days_of_week to raise ValueError and updated docstring * moved whatsnew entry to be next to relevant holiday entry * updated rst to link relevant issue
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.
Closes #2
dropna()
to correctly handle mixed-type DataFrames.tests/frame/test_dropna_mixedtypes.py
to verify the fix.pytest
.[✔] Tests added and passed
[✔] All code checks passed