Skip to content

Conversation

@pragati-0208
Copy link

@pragati-0208 pragati-0208 commented Feb 9, 2026

Summary

This PR fixes a FutureWarning from pandas that occurs when pd.unique() is called on a list input in the infer_categorical_columns function. The warning indicates that list inputs will be rejected in future pandas versions.

Changes Made

  • Modified nwbwidgets/utils/dynamictable.py
  • Convert list to numpy array before calling pd.unique()
  • Maintains all existing functionality while eliminating the warning

Motivation

  • Eliminates distracting warnings during test execution
  • Ensures compatibility with future pandas versions
  • Follows pandas best practices for array handling

Testing

  • All existing tests pass (114 passed, 1 skipped)
  • No changes to function behavior
  • Warning no longer appears in test output

Related Issues

This addresses warnings seen in the test suite output.

Checklist

  • Code follows project style guidelines
  • Tests pass locally
  • No breaking changes to existing functionality

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.

2 participants