Skip to content

feat: add pandas DataFrame/Series support to bias_variance_decomp#1166

Merged
rasbt merged 1 commit into
rasbt:masterfrom
berns722:feature/bias-variance-dataframe-support
May 20, 2026
Merged

feat: add pandas DataFrame/Series support to bias_variance_decomp#1166
rasbt merged 1 commit into
rasbt:masterfrom
berns722:feature/bias-variance-dataframe-support

Conversation

@berns722
Copy link
Copy Markdown
Contributor

@berns722 berns722 commented May 19, 2026

Code of Conduct

I have read and agree to follow the mlxtend Code of Conduct.

Description

This PR adds native support for pandas DataFrame and Series inputs to bias_variance_decomp, replacing the previous behavior of raising a ValueError.

DataFrame and Series inputs are now automatically converted to numpy arrays internally, allowing users to integrate the function seamlessly into pandas-based workflows.

Related issues or pull requests

Closes #1070.

Pull Request Checklist

  • Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file
  • Added appropriate unit test functions in the ./mlxtend/*/tests directories
  • Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/ (not applicable)
  • Ran pytest on the modified test file — all 5 relevant tests pass (test_keras skipped, requires tensorflow)
  • Code style verified via pre-commit hooks (black, isort, flake8)

Copy link
Copy Markdown
Owner

@rasbt rasbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for submitting

@rasbt rasbt merged commit 4420064 into rasbt:master May 20, 2026
3 checks passed
@berns722 berns722 deleted the feature/bias-variance-dataframe-support branch May 26, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using pandas dataframes in bias-variance-docmposition

2 participants