pd

module of dascore.utils source

Pandas utilities.

Functions

Name Description
adjust_segments Filter a dataframe and adjust its limits.
dataframe_to_patch Convert a dataframe to a patch.
drop_private_columns Drop every remaining private (leading underscore) column.
drop_selector_names Return an _attrs/_coords argument with some names taken out.
fill_defaults_from_pydantic Fill missing columns in dataframe with defaults from base_model.
filter_df Determine if each row of the index meets some filter requirements.
get_dim_names_from_columns Returns the names of columns which represent and range in the dataframe.
get_interval_columns Return a series of start, stop, step for columns.
get_regex Compile, and cache regex for str queries.
iter_rows Iterate over a dataframe’s rows as named tuples of a known shape.
list_ser_to_str Convert a column of str sequences to a string with commas separating values.
normalize_range_forms Normalize the patch-level slice range form to a 2-tuple.
patch_to_dataframe Convert a patch to a dataframe.
present_columns Return the public view of a flat relation.
present_data_size_column Expose _data_size as data_size.
present_dtype_column Expose _dtype as dtype.
present_units_columns Expose private _{name}_units columns under public names.
relative_offset Resolve one relative bound against a global [gmin, gmax] envelope.
relative_ranges_to_absolute Resolve relative (start, stop) ranges against a frame’s global envelopes.
requested_selector_names Return every name a selection call names, whatever form it arrives in.
resolve_selector_namespaces Split selector kwargs into (attrs, coords) per the selector spec.
rolling_df A simple wrapper around pandas rolling to handle deprecated axis.
selector_spec_names Return the names an _attrs/_coords argument designates.
split_df_query Split kwargs into normal, range, and unsupported kwargs.
yield_range_tuple_from_kwargs For each slice keyword, yield the name and a tuple of (start, stop).