MCPcopy Index your code
hub / github.com/dask/dask / equal_dtypes

Function equal_dtypes

dask/dataframe/utils.py:336–345  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

334 eq_types = {"i", "f", "u"} if numeric_equal else set()
335
336 def equal_dtypes(a, b):
337 if isinstance(a, pd.CategoricalDtype) != isinstance(b, pd.CategoricalDtype):
338 return False
339 if isinstance(a, str) and a == "-" or isinstance(b, str) and b == "-":
340 return False
341 if isinstance(a, pd.CategoricalDtype) and isinstance(b, pd.CategoricalDtype):
342 if UNKNOWN_CATEGORIES in a.categories or UNKNOWN_CATEGORIES in b.categories:
343 return True
344 return a == b
345 return (a.kind in eq_types and b.kind in eq_types) or is_dtype_equal(a, b)
346
347 if not (
348 is_dataframe_like(meta) or is_series_like(meta) or is_index_like(meta)

Callers 1

check_metaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…