[FEA] Internal python _is_homogeneous property #7067
Labels
feature request
New feature or request
good first issue
Good for newcomers
Python
Affects Python cuDF API.
Is your feature request related to a problem? Please describe.
It might be useful to have a singular clean and performant way to check if all the columns of a dataframe are of the same dtype, such as a
DataFrame
property_is_homogeneous
. This comes up in a lot of places, such as where we might want to dispatch to a cupy matrix implementation (Transpose, some row wise reductions I believe and some other places), as well as many places we might want to error or warn.Describe the solution you'd like
A property
cudf.DataFrame._is_homogeneous
that returnsTrue
if all of the datatypes of all of the columns are equal else false. This should be plumbed into the places where we currently use a loop or other means. This might be a good first issue being (hopefully) straightforward and requiring some somewhat broad exploration of the cuDF python layer.Describe alternatives you've considered
Writing a possibly slightly different loop every time
Additional context
Add any other context, code examples, or references to existing implementations about the feature request here.
The text was updated successfully, but these errors were encountered: