mixle.data.sources.pandas_source module¶
Pandas DataFrame connector + adapters – DataFrame columns into the sequence-encoded stats API.
The adapter never imports pandas (it duck-types df.columns/.loc/.itertuples); the pandas
extra is only needed to construct the DataFrame you pass in. read_dataframe wraps a DataFrame as a
DataSource so it funnels into the same encoder contract as every other source.
- dataframe_records(df, fields=None, as_dict=False)[source]
Convert DataFrame columns into observation records for
seq_encode.A single selected field becomes scalar observations. Multiple selected fields become tuple observations in the requested field order, matching the data shape expected by composite distributions. When
as_dict=True, each row is returned as a mapping keyed by the selected source field names.
- seq_encode_dataframe(df, fields=None, encoder=None, estimator=None, model=None, num_chunks=1, chunk_size=None)[source]
Sequence-encode selected DataFrame columns with the ordinary stats API.
- read_dataframe(df, fields=None, *, as_dict=False, structure=EXCHANGEABLE, schema=None)[source]
Wrap a pandas DataFrame’s selected columns as a DataSource (scalar/tuple/dict records).