MCPcopy
hub / github.com/dask/dask / meta_series_constructor

Function meta_series_constructor

dask/dataframe/utils.py:743–763  ·  view source on GitHub ↗

Return a serial Series constructor Parameters ---------- like : Any series-like, Index-like or dataframe-like object.

(like)

Source from the content-addressed store, hash-verified

741
742
743def meta_series_constructor(like):
744 """Return a serial Series constructor
745
746 Parameters
747 ----------
748 like :
749 Any series-like, Index-like or dataframe-like object.
750 """
751 if is_dask_collection(like):
752 try:
753 like = like._meta
754 except AttributeError:
755 raise TypeError(f"{type(like)} not supported by meta_series_constructor")
756 if is_dataframe_like(like):
757 return like._constructor_sliced
758 elif is_series_like(like):
759 return like._constructor
760 elif is_index_like(like):
761 return like.to_frame()._constructor_sliced
762 else:
763 raise TypeError(f"{type(like)} not supported by meta_series_constructor")
764
765
766def get_string_dtype():

Callers 8

idxmaxmin_chunkFunction · 0.90
idxmaxmin_rowFunction · 0.90
stdMethod · 0.90
_dot_seriesFunction · 0.90
__array_wrap__Method · 0.90
to_datetimeFunction · 0.90

Calls 5

is_dask_collectionFunction · 0.90
is_dataframe_likeFunction · 0.90
is_series_likeFunction · 0.90
is_index_likeFunction · 0.90
to_frameMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…