Skip to content

fix: include bool dtype in categorical columns for TabularDescriptionTables (ZD #609)#496

Merged
hunner merged 1 commit intomainfrom
hunner/zd-609
Apr 27, 2026
Merged

fix: include bool dtype in categorical columns for TabularDescriptionTables (ZD #609)#496
hunner merged 1 commit intomainfrom
hunner/zd-609

Conversation

@hunner
Copy link
Copy Markdown
Contributor

@hunner hunner commented Apr 24, 2026

Pull Request Description

What and why?

TabularDescriptionTables.py classifies columns by pandas dtype via select_dtypes(). The three helpers cover int/float/uint8 (numerical), object/category (categorical), and datetime, but bool is absent absent. A column with dtype=bool falls through every check and is never included.

How to test

Supply a bool dataframe to the dataset.

What needs special review?

None

Dependencies, breaking changes, and deployment notes

None

Release notes

  • Fix: include bool data fields in categorical table results

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@hunner hunner requested a review from juanmleng April 24, 2026 20:48
@hunner hunner added bug Something isn't working python Pull requests that update Python code labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Summary

This pull request extends the functionality of the TabularDescriptionTables module by modifying the way categorical columns are identified. Previously, only columns with data types 'object' and 'category' were included. The change introduces boolean (bool) columns as part of the categorical data types, ensuring better representation of datasets that include flag-like or binary data.

Additionally, a unit test has been added in the tests suite to verify that boolean columns (such as 'flag' and 'active' in the example) are appropriately identified and appear in the categorical table. This ensures that function behavior aligns with the intended inclusion of boolean types in categorical analyses.

Test Suggestions

  • Test with various input DataFrames that include combinations of boolean, numerical, and categorical columns to verify accurate identification.
  • Include tests where DataFrames consist solely of boolean columns to validate that the categorical table is populated correctly.
  • Introduce tests for edge cases such as DataFrames with null values in boolean columns to detect potential unexpected behavior.

@hunner hunner added the support Support-related PR label Apr 24, 2026
Copy link
Copy Markdown
Contributor

@juanmleng juanmleng left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks @hunner!

@hunner hunner merged commit f7daa7f into main Apr 27, 2026
24 checks passed
@hunner hunner deleted the hunner/zd-609 branch April 27, 2026 16:54
@hunner hunner mentioned this pull request Apr 30, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update Python code support Support-related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants