Merged
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Non-Pythonic Type Checking ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| MatPlus/BoxPlot.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
MatPlus/BoxPlot.py
Outdated
Comment on lines
+69
to
+73
| if not ( | ||
| isinstance(data, list) | ||
| or isinstance(data, np.ndarray) | ||
| or isinstance(data, pd.Series) | ||
| ): |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
liamjdavis
reviewed
Jun 18, 2025
Collaborator
liamjdavis
left a comment
There was a problem hiding this comment.
Add the change to the CHANGELOG.md and then we can merge!
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
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.
This pull request introduces support for
pandas.Seriesin theBoxPlotclass, updates the corresponding data validation logic, and modifies the example notebook to reflect these changes.Support for
pandas.SeriesinBoxPlot:MatPlus/BoxPlot.py: Addedpandasas a dependency and updated the__init__method to includepandas.Seriesas a valid data type for thedataparameter. The error message was also updated to reflect this change. [1] [2]Updates to the example notebook:
examples/box_plot.ipynb: Adjusted the notebook to regenerate the box plot example with the updatedBoxPlotclass. This included changes to the execution count and the embedded image data.Description by Korbit AI
What change is being made?
Add support for Pandas dataframes to the BoxPlot class by updating type validation to accept any data convertible to a numeric array.
Why are these changes being made?
This change enables users to input Pandas dataframes into the BoxPlot class, enhancing its flexibility and interoperability with popular data structures in data analysis workflows. By leveraging NumPy's array-like conversion, the implementation supports a wider range of input types efficiently, while maintaining robust error handling for invalid inputs.