Skip to content

Conversation

khemkaran10
Copy link
Contributor

@khemkaran10 khemkaran10 commented Jul 16, 2025

Before Fix:

>>> df = pd.DataFrame({"a": [1, 2, 3]})
>>> df.describe(include=["datetime"])
...
ValueError: No objects to concatenate

After Fix:

>>> df = pd.DataFrame({"a": [1, 2, 3]})
>>> df.describe(include=["datetime"])
...
ValueError: No columns match the specified include or exclude data types

@khemkaran10
Copy link
Contributor Author

pre-commit.ci autofix

@mroeschke mroeschke added the Error Reporting Incorrect or improved errors from pandas label Jul 16, 2025
@khemkaran10
Copy link
Contributor Author

df = pd.DataFrame({"a": [1, 2, 3]})
df.describe(exclude=[np.int64])
...
ValueError: None of the included dtypes are present in the DataFrame

After the fix, this example will also show the same error. Should we change the error message to something like,
No columns match the specified include or exclude data types

@khemkaran10 khemkaran10 requested a review from mroeschke July 16, 2025 18:19
@khemkaran10
Copy link
Contributor Author

@mroeschke I have made the requested changes. can you please review it.

Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: describe(include=..) fails with unrelated error if provided data types are not present
2 participants