Skip to main content

Crate fp_frame

Crate fp_frame 

Source
Expand description

DataFrame / Series core for frankenpandas — the user-facing analytics surface, mirroring pandas’ DataFrame and Series APIs plus their groupby / window / resample / accessor families.

This is the largest workspace crate. It glues together:

  • fp-types: scalar values, dtypes, nan* reductions
  • fp-columnar: per-column storage (Column)
  • fp-index: row labels and binary-op alignment
  • fp-runtime: optional decision-recording policy

Most callers reach the contents of this crate via the frankenpandas umbrella prelude (use frankenpandas::prelude::*) or via direct imports (use fp_frame::DataFrame).

§Core data structures

  • DataFrame: columnar table with a row Index and an ordered column map. Constructors mirror pandas: from_dict, from_series, from_columns, from_records. Operations cover selection, mutation, reindexing, grouping, window-functions, joins, IO round-trips (via fp-io).
  • Series: single-column labeled vector. Built-in arithmetic, reductions, and accessor families (string / datetime / categorical / sparse).
  • FrameError: failure modes (column-not-found, length mismatch, dtype mismatch, alignment error, …).

§GroupBy and window operations

§Accessors

Mirror pandas .str / .dt / .cat / .sparse namespaces:

§Type coercion (pandas pd.to_* analogs)

§Frame combination

concat_dataframes, concat_series, concat_dataframes_with_* variants mirror pd.concat(..., axis=, join=, ignore_index=, keys=). Merge / join helpers live in the sibling fp-join crate (merge_dataframes_on, merge_asof, merge_ordered, join_series).

§SQL IO

Read / write IO for DataFrames lives in fp-io, which exposes the DataFrameIoExt extension trait so users can call df.to_parquet(path), df.to_sql(conn, ..), etc. directly on values from this crate.

Structs§

BoxPlotSpec
Backend-neutral boxplot request produced by boxplot() hooks.
CategoricalAccessor
Accessor for categorical operations on a Series.
CategoricalMetadata
Metadata for categorical (factor) data.
ColumnStore
Order-preserving, duplicate-tolerant column store.
ColumnStoreIter
Name-sorted merging iterator behind ColumnStore::iter.
ColumnStoreIterMut
Mutable iterator over columns in positional order.
DataFrame
DataFrameCsvReadOptions
DataFrameDictSplit
DataFrameDictTight
Pandas 2.2 to_dict(orient='tight') payload.
DataFrameEwm
Exponentially weighted moving window over a DataFrame’s numeric columns.
DataFrameExpanding
Expanding window aggregation over a DataFrame’s numeric columns.
DataFrameFlags
DataFrameGroupBy
Deferred GroupBy object for DataFrame.
DataFrameResample
Time-based resampling view over a DataFrame’s numeric columns.
DataFrameRolling
Rolling window aggregation over a DataFrame’s numeric columns.
DataFrameTransposeView
DataFrameXArrayDataset
DataFrameXArrayVariable
DatetimeAccessor
Ewm
Exponentially weighted moving window aggregation over a Series.
Expanding
Expanding window aggregation over a Series.
Float64BlockView
O(1) zero-copy view of a block-backed homogeneous-float DataFrame, matching pandas’ df.values on a single-block float frame (an F-contiguous (rows, cols) array sharing the frame’s memory).
GroupByEwm
Grouped exponentially weighted window over a DataFrameGroupBy.
GroupByExpanding
Grouped expanding window over a DataFrameGroupBy.
GroupByResample
GroupByRolling
Grouped rolling window over a DataFrameGroupBy.
HistogramSpec
Backend-neutral histogram request produced by hist() hooks.
ListAccessor
Accessor for list operations on a Series.
OnlineEwm
Streaming EWM accumulator. Returned by Ewm::online.
PlotSeriesSpec
One logical series ready for a future plotting backend.
PlotSpec
Backend-neutral plot request produced by plot() hooks.
Resample
Time-based resampling view over a Series.
ResampleGrouping
Rolling
Rolling window aggregation over a Series.
Series
SeriesGroupBy
GroupBy for Series, grouping by values of another Series.
SeriesGroupByEwm
Grouped exponentially weighted window over a SeriesGroupBy.
SeriesGroupByExpanding
Grouped expanding window over a SeriesGroupBy.
SeriesGroupByResample
Grouped resampling over a SeriesGroupBy.
SeriesGroupByRolling
Grouped rolling window over a SeriesGroupBy.
SeriesXArrayDataArray
xarray DataArray representation of a Series.
SparseAccessor
Accessor for sparse operations on a Series.
SparseDataFrameView
StringAccessor
Created by Series::str(). Provides string manipulation methods analogous to pandas Series.str namespace.
StructAccessor
Accessor for struct operations on a Series.
StyledDataFrame
A lightweight analogue of pandas’ Styler, returned by DataFrame::style.
ToDatetimeOptions
ToNumericOptions
Options for to_numeric_with_options.
ToTimedeltaOptions
Options for to_timedelta conversion.
TzLocalizeOptions

Enums§

ColumnSelection
ConcatJoin
CsvQuoting
DataFrameArithmeticOperand
DataFrameColumnInput
DataFrameComparisonOperand
DataFrameDictAxisLabels
DataFrameDictResult
DropNaHow
FrameError
PlotKind
Logical plot kind requested by a pandas-style plotting hook.
ResampleClosed
Shared resample grouping used by Series and DataFrame resample paths.
ResampleLabel
SeriesResetIndexResult
SeriesTypedValues
Borrowed typed numeric values for a Series.
ToDatetimeOrigin
ToNumericErrors
Convert a Series to a numeric dtype.
ToTimedeltaErrors
Error handling mode for to_timedelta conversions.
TzAmbiguousPolicy
Datetime accessor for Series, analogous to pd.Series.dt.
TzNonexistentPolicy

Traits§

DataFrameApplyArg

Functions§

concat_dataframes
Concatenate DataFrames along axis 0 (row-wise).
concat_dataframes_with_axis
Concatenate DataFrames along the requested axis.
concat_dataframes_with_axis_join
Concatenate DataFrames along axis with explicit join policy.
concat_dataframes_with_ignore_index
Concatenate DataFrames along axis 0 with optional index reset.
concat_dataframes_with_keys
Concatenate DataFrames with keys for hierarchical labeling.
concat_series
Concatenate multiple Series along axis 0 (row-wise).
concat_series_with_ignore_index
cut
cut_bins
Bin values into the explicit intervals defined by edges.
index_to_frame
Convert an Index to a single-column DataFrame.
index_to_series
Convert an Index to a Series.
overflow_policy_for_mode
Map the runtime’s compatibility mode onto the temporal overflow policy.
qcut
Quantile-based binning.
qcut_at_quantiles
Quantile-based binning at an explicit sequence of quantile probabilities.
timedelta_total_seconds
Convert a timedelta-like Series to total seconds as Float64.
to_datetime
Convert a Series of strings or integers to normalized ISO 8601 datetime strings.
to_datetime_values_with_options
Convert scalar values to datetime with explicit pandas-like options.
to_datetime_with_format
Convert to datetime with an explicit format string.
to_datetime_with_options
Convert to datetime with explicit pandas-like options.
to_datetime_with_unit
Convert numeric epoch values using an explicit unit.
to_numeric
Convert a Series of strings/bools to numbers, matching pd.to_numeric(arg): errors='raise' by default, so an unparseable value is rejected with an Err. Pass ToNumericErrors::Coerce via to_numeric_with_options to map unparseable values to NaN instead (br-frankenpandas-mlaht).
to_numeric_with_options
Convert a Series of strings/bools to numbers with an explicit errors= policy, matching pd.to_numeric(arg, errors=...).
to_timedelta
Convert a Series of strings or numbers to Timedelta64 representation.
to_timedelta_with_options
Convert to timedelta with explicit options.
to_timedelta_with_unit
Convert numeric values to timedelta using explicit unit.
wide_to_long
Reshape a wide DataFrame to long form (pd.wide_to_long).