AlloViz.AlloViz.Elements.Edges._is_homogeneous_type

property

property Edges._is_homogeneous_type: bool

Whether all the columns in a DataFrame have the same type.

Returns:
bool

See also

Index._is_homogeneous_type

Whether the object has a single dtype.

MultiIndex._is_homogeneous_type

Whether all the levels of a MultiIndex have the same dtype.

Examples

>>> DataFrame({"A": [1, 2], "B": [3, 4]})._is_homogeneous_type
True
>>> DataFrame({"A": [1, 2], "B": [3.0, 4.0]})._is_homogeneous_type
False

Items with the same type but different sizes are considered different types.

>>> DataFrame({
...    "A": np.array([1, 2], dtype=np.int32),
...    "B": np.array([1, 2], dtype=np.int64)})._is_homogeneous_type
False