maxframe.dataframe.DataFrame#
- class maxframe.dataframe.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False, chunk_size=None, gpu=None, sparse=None, num_partitions=None, dtype_backend=None)[source]#
- __init__(data=None, index=None, columns=None, dtype=None, copy=False, chunk_size=None, gpu=None, sparse=None, num_partitions=None, dtype_backend=None)[source]#
Methods
__init__([data, index, columns, dtype, ...])abs()add(other[, axis, level, fill_value])Get Addition of dataframe and other, element-wise (binary operator add).
add_prefix(prefix)Prefix labels with string prefix.
add_suffix(suffix)Suffix labels with string suffix.
agg([func, axis])Aggregate using one or more operations over the specified axis.
aggregate([func, axis])Aggregate using one or more operations over the specified axis.
align(other[, join, axis, level, copy, ...])Align two objects on their axes with the specified join method.
all([axis, bool_only, skipna, level, method])any([axis, bool_only, skipna, level, method])append(other[, ignore_index, ...])Append rows of other to the end of caller, returning a new object.
apply(func[, axis, raw, result_type, args, ...])Apply a function along an axis of the DataFrame.
applymap(func[, na_action, dtypes, dtype, ...])Apply a function to a Dataframe elementwise.
around([decimals])Round a DataFrame to a variable number of decimal places.
assign(**kwargs)Assign new columns to a DataFrame.
astype(dtype[, copy, errors])Cast a pandas object to a specified dtype
dtype.at_time(time[, axis])Select values at particular time of day (e.g., 9:30AM).
backfill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='bfill'.between_time(start_time, end_time[, ...])Select values between particular times of the day (e.g., 9:00-9:30 AM).
bfill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='bfill'.clip([lower, upper, axis, inplace])Trim values at input threshold(s).
combine(other, func[, fill_value, overwrite])Perform column-wise combine with another DataFrame.
combine_first(other)Update null elements with value in the same location in other.
compare(other[, align_axis, keep_shape, ...])Compare to another DataFrame and show the differences.
convert_dtypes([infer_objects, ...])Convert columns to best possible dtypes using dtypes supporting
pd.NA.copy()copy_from(obj)copy_to(target)corr([method, min_periods])Compute pairwise correlation of columns, excluding NA/null values.
corrwith(other[, axis, drop, method])Compute pairwise correlation.
count([axis, level, numeric_only])cov([min_periods, ddof, numeric_only])Compute pairwise covariance of columns, excluding NA/null values.
cummax([axis, skipna])cummin([axis, skipna])cumprod([axis, skipna])cumsum([axis, skipna])describe([percentiles, include, exclude])Generate descriptive statistics.
diff([periods, axis])First discrete difference of element.
div(other[, axis, level, fill_value])Get Floating division of dataframe and other, element-wise (binary operator truediv).
dot(other)Compute the matrix multiplication between the DataFrame and other.
drop([labels, axis, index, columns, level, ...])Drop specified labels from rows or columns.
drop_duplicates([subset, keep, inplace, ...])Return DataFrame with duplicate rows removed.
droplevel(level[, axis])Return Series/DataFrame with requested index / column level(s) removed.
dropna([axis, how, thresh, subset, inplace, ...])Remove missing values.
duplicated([subset, keep, method])Return boolean Series denoting duplicate rows.
eq(other[, axis, level, fill_value])Get Equal to of dataframe and other, element-wise (binary operator eq).
eval(expr[, inplace])Evaluate a string describing operations on DataFrame columns.
ewm([com, span, halflife, alpha, ...])Provide exponential weighted functions.
execute([session])expanding([min_periods, shift, reverse_range])Provide expanding transformations.
explode(column[, ignore_index, ...])Transform each element of a list-like to a row, replicating index values.
ffill([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='ffill'.fillna([value, method, axis, inplace, ...])Fill NA/NaN values using the specified method.
filter([items, like, regex, axis])Subset the dataframe rows or columns according to the specified index labels.
Return index for first non-NA value or None, if no non-NA value is found.
floordiv(other[, axis, level, fill_value])Get Integer division of dataframe and other, element-wise (binary operator floordiv).
from_dict(data[, orient, dtype, columns])Construct DataFrame from dict of array-like or dicts.
from_records(data[, index, exclude, ...])Convert structured or record ndarray to DataFrame.
from_tensor(tensor[, index, columns, gpu, ...])ge(other[, axis, level, fill_value])Get Greater than or equal to of dataframe and other, element-wise (binary operator ge).
groupby([by, level, as_index, sort, ...])Group DataFrame using a mapper or by a Series of columns.
gt(other[, axis, level, fill_value])Get Greater than of dataframe and other, element-wise (binary operator gt).
head([n])Return the first n rows.
idxmax([axis, skipna])Return index of first occurrence of maximum over requested axis.
idxmin([axis, skipna])Return index of first occurrence of minimum over requested axis.
infer_objects([copy])Attempt to infer better dtypes for object columns.
insert(loc, column, value[, allow_duplicates])Insert column into DataFrame at specified location.
isin(values)Whether each element in the DataFrame is contained in values.
isna()Detect missing values.
isnull()Detect missing values.
iterrows([batch_size, session])Iterate over DataFrame rows as (index, Series) pairs.
itertuples([index, name, batch_size, session])Iterate over DataFrame rows as namedtuples.
join(other[, on, how, lsuffix, rsuffix, ...])Join columns of another DataFrame.
keys()Get the 'info axis' (see Indexing for more).
kurt([axis, skipna, level, numeric_only, ...])kurtosis([axis, skipna, level, ...])Return index for last non-NA value or None, if no non-NA value is found.
le(other[, axis, level, fill_value])Get Less than or equal to of dataframe and other, element-wise (binary operator le).
lt(other[, axis, level, fill_value])Get Less than of dataframe and other, element-wise (binary operator lt).
map(func[, na_action, dtypes, dtype, skip_infer])Apply a function to a Dataframe elementwise.
mask(cond[, other, inplace, axis, level, ...])Replace values where the condition is True.
max([axis, skipna, level, numeric_only, method])mean([axis, skipna, level, numeric_only, method])median([axis, skipna, level, numeric_only, ...])melt([id_vars, value_vars, var_name, ...])Unpivot a DataFrame from wide to long format, optionally leaving identifiers set.
memory_usage([index, deep])Return the memory usage of each column in bytes.
merge(right[, how, on, left_on, right_on, ...])Merge DataFrame or named Series objects with a database-style join.
min([axis, skipna, level, numeric_only, method])mod(other[, axis, level, fill_value])Get Modulo of dataframe and other, element-wise (binary operator mod).
mode([axis, numeric_only, dropna, combine_size])Get the mode(s) of each element along the selected axis.
mul(other[, axis, level, fill_value])Get Multiplication of dataframe and other, element-wise (binary operator mul).
multiply(other[, axis, level, fill_value])Get Multiplication of dataframe and other, element-wise (binary operator mul).
ne(other[, axis, level, fill_value])Get Not equal to of dataframe and other, element-wise (binary operator ne).
nlargest(n, columns[, keep])Return the first n rows ordered by columns in descending order.
notna()Detect existing (non-missing) values.
notnull()Detect existing (non-missing) values.
nsmallest(n, columns[, keep])Return the first n rows ordered by columns in ascending order.
nunique([axis, dropna])Count distinct observations over requested axis.
pad([axis, inplace, limit, downcast])Synonym for
DataFrame.fillna()withmethod='ffill'.pct_change([periods, fill_method, limit, freq])Percentage change between the current and a prior element.
pivot(columns[, index, values])Return reshaped DataFrame organized by given index / column values.
pivot_table([values, index, columns, ...])Create a spreadsheet-style pivot table as a DataFrame.
pop(item)Return item and drop from frame.
pow(other[, axis, level, fill_value])Get Exponential power of dataframe and other, element-wise (binary operator pow).
prod([axis, skipna, level, min_count, ...])product([axis, skipna, level, min_count, ...])quantile([q, axis, numeric_only, interpolation])Return values at the given quantile over requested axis.
query(expr[, inplace])Query the columns of a DataFrame with a boolean expression.
radd(other[, axis, level, fill_value])Get Addition of dataframe and other, element-wise (binary operator radd).
rank([axis, method, numeric_only, ...])Compute numerical data ranks (1 through n) along axis.
rdiv(other[, axis, level, fill_value])Get Floating division of dataframe and other, element-wise (binary operator rtruediv).
rechunk(chunk_size[, reassign_worker])Rechunk DataFrame, Series or Index data.
reindex([labels, index, columns, axis, ...])Conform Series/DataFrame to new index with optional filling logic.
reindex_like(other[, method, copy, limit, ...])Return an object with matching indices as other object.
rename([mapper, index, columns, axis, copy, ...])Alter axes labels.
rename_axis([mapper, index, columns, axis, ...])Set the name of the axis for the index or columns.
reorder_levels(order[, axis])Rearrange index levels using input order.
replace([to_replace, value, inplace, limit, ...])Replace values given in to_replace with value.
reset_index([level, drop, inplace, ...])Reset the index, or a level of it.
rfloordiv(other[, axis, level, fill_value])Get Integer division of dataframe and other, element-wise (binary operator rfloordiv).
rmod(other[, axis, level, fill_value])Get Modulo of dataframe and other, element-wise (binary operator rmod).
rmul(other[, axis, level, fill_value])Get Multiplication of dataframe and other, element-wise (binary operator rmul).
rolling(window[, min_periods, center, ...])Provide rolling window calculations.
round([decimals])Round a DataFrame to a variable number of decimal places.
rpow(other[, axis, level, fill_value])Get Exponential power of dataframe and other, element-wise (binary operator rpow).
rsub(other[, axis, level, fill_value])Get Subtraction of dataframe and other, element-wise (binary operator rsubtract).
rtruediv(other[, axis, level, fill_value])Get Floating division of dataframe and other, element-wise (binary operator rtruediv).
sample([n, frac, replace, weights, ...])Return a random sample of items from an axis of object.
select_dtypes([include, exclude])Return a subset of the DataFrame's columns based on the column dtypes.
sem([axis, skipna, level, ddof, ...])set_axis(labels[, axis, inplace])Assign desired index to given axis.
set_index(keys[, drop, append, inplace, ...])Set the DataFrame index using existing columns.
shift([periods, freq, axis, fill_value])Shift index by desired number of periods with an optional time freq.
skew([axis, skipna, level, numeric_only, ...])sort_index([axis, level, ascending, ...])Sort object by labels (along an axis).
sort_values(by[, axis, ascending, inplace, ...])Sort by the values along either axis.
stack([level, dropna])Stack the prescribed level(s) from columns to index.
std([axis, skipna, level, ddof, ...])sub(other[, axis, level, fill_value])Get Subtraction of dataframe and other, element-wise (binary operator subtract).
sum([axis, skipna, level, min_count, ...])swaplevel([i, j, axis])Swap levels i and j in a
MultiIndex.tail([n])Return the last n rows.
take(indices[, axis])Return the elements in the given positional indices along an axis.
to_clipboard(*[, excel, sep, batch_size, ...])Copy object to the system clipboard.
to_csv(path[, sep, na_rep, float_format, ...])Write object to a comma-separated values (csv) file.
to_dict([orient, into, index, batch_size, ...])Convert the DataFrame to a dictionary.
to_json([path, orient, date_format, ...])Convert the object to a JSON string.
to_lance(path[, mode, index, index_label, ...])Write a DataFrame to a Lance dataset.
to_odps_table(table[, partition, ...])Write DataFrame object into a MaxCompute (ODPS) table.
to_pandas([session])to_parquet(path[, engine, compression, ...])Write a DataFrame to the binary parquet format, each chunk will be written to a Parquet file.
to_tensor()transform(func[, axis, dtypes, skip_infer])Call
funcon self producing a DataFrame with transformed values.transpose()Transpose index and columns.
truediv(other[, axis, level, fill_value])Get Floating division of dataframe and other, element-wise (binary operator truediv).
truncate([before, after, axis, copy])Truncate a Series or DataFrame before and after some index value.
tshift([periods, freq, axis])Shift the time index, using the index's frequency if available.
unstack([level, fill_value])Unstack, also known as pivot, Series with MultiIndex to produce DataFrame.
update(other[, join, overwrite, ...])Modify in place using non-NA values from another DataFrame.
value_counts([subset, normalize, sort, ...])var([axis, skipna, level, ddof, ...])where(cond[, other, inplace, axis, level, ...])Replace values where the condition is False.
xs(key[, axis, level, drop_level])Return cross-section from the Series/DataFrame.
Attributes
TAccess a single value for a row/column label pair.
dataReturn the dtypes in the DataFrame.
Access a single value for a row/column pair by integer position.
Purely integer-location based indexing for selection by position.
Access a group of rows and columns by label(s) or a boolean array.
Return an int representing the number of axes / array dimensions.
sizetype_namevalues