MCPcopy Index your code
hub / github.com/plotly/plotly.py / _is_continuous

Function _is_continuous

plotly/express/_core.py:161–167  ·  view source on GitHub ↗
(df: nw.DataFrame, col_name: str)

Source from the content-addressed store, hash-verified

159
160
161def _is_continuous(df: nw.DataFrame, col_name: str) -> bool:
162 if nw.dependencies.is_pandas_like_dataframe(df_native := df.to_native()):
163 # fastpath for pandas: Narwhals' Series.dtype has a bit of overhead, as it
164 # tries to distinguish between true "object" columns, and "string" columns
165 # disguised as "object". But here, we deal with neither.
166 return df_native[col_name].dtype.kind in "ifc"
167 return df.get_column(col_name).dtype.is_numeric()
168
169
170def _to_unix_epoch_seconds(s: nw.Series) -> nw.Series:

Callers 4

make_trace_kwargsFunction · 0.85
build_dataframeFunction · 0.85
infer_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected